leitura rápida

Git Merge

Merge

(no fast-foward)

git checkout -b feature-new-branch master
git add .
git commit -m "primeiro commit"
git add .
git commit -m "segundo commit"
git checkout master
git merge feature-new-branch
git checkout master
git commit -a -m "adiciona um commit na master atoa"

Merge

(squash commit)

git checkout -b feature-new-branch master
git add .
git commit -m "primeiro commit"
git add .
git commit -m "segundo commit"
git checkout master
git merge feature-new-branch --squash
git checkout master
git commit -a -m "adiciona um commit na master atoa"

Merge

(rebase)

git checkout -b feature-new-branch main
git add .
git commit -m "primeiro commit"
git add .
git commit -m "segundo commit"
git rebase main
git checkout main
git merge feature-new-branch --ff-only
git checkout main
git commit -a -m "adiciona um commit na master atoa"

Merge

(semi-linear)

git checkout -b feature-new-branch master
git add .
git commit -m "primeiro commit"
git add .
git commit -m "segundo commit"
git rebase master
git checkout master
git merge feature-new-branch --no-ff
git checkout master
git commit -a -m "adiciona um commit na master atoa"

Felipe F. Rocha

felipefonsecarocha@gmail.com

 

OBRIGADO!!!

Made with Slides.com