mi carpeta existe
mi carpeta no existe
git init
git clone [url] origin
$ git remote -v
$ git remote add [url] origin
$ git remote remove origin
story remains!
# Titulo primer nivel
## Titulo segundo nivel
*italic*
**bold**
´´´js
´´´
$ touch readme.md
$ git add .
$ git commit -m "Initial commit"
$ git push origin master
$ touch .gitignore
$ git add .
$ git commit -m "add gitignore"
$ git push origin master
// change branch
$ git checkout feature/my-branch
// create new branch
$ git checkout -b feature/my-branch
// delete branch (local)
$ git branch -D feature/my-branch
initial commit
initial commit
// sync branches
$ git --set-upstream my-branch origin/my-branch
initial commit
Working directory
staging area
repository
add
commit
initial commit
$ git status
// add changes to stage area
$ git add .
$ git add src
$ git add src/my-file.js
initial commit
// confirm changes
$ git commit -m "feat(front) add support for decimals"
// add to stage and confirm changes
$ git commit -am "feat..."
initial commit
MASTER
DEVELOP
FEATURE/MY-FEATURE
HOTFIX
initial commit
git checkout -b feature/xxx
commit
PR
MASTER
DEVELOP
git checkout -b hotfix/xxx
initial commit
initial commit
$ git status
fix conflicts
$ git add
$ git commit
initial commit
Qué hago cuando hago un pull y tengo cambios pendientes en local?
quiero conservarlos?
no
git checkout --
si
quiero commitearlos?
si
no
git stash
git commit
initial commit
// guarda los cambios no confirmados
$ git stash save
// aplica los cambios del ultimo save
$ git stash apply
initial commit
Qué hago cuando he hecho un commit mal
Lo he subido?
git reset HEAD
quiero los cambios?
si
no
--soft
--hard
no
si
me averguenzo?
si
no
git revert HEAD~2
git reset HEAD~2 --hard
git push --force
initial commit