$ git merge --squash feature

Compare branches and realign feature branch with master branch

$ git checkout feature
$ git rebase master

Never use rebase in large public repos, instead can be used in local repos.


DevOps for Node.js Engineers: Git Rebasing

If you do not want merge commits every time you pull changes, run the command:

git pull --rebase

…You must understand that rebasing can rewrite Git history. On some projects, rebasing could be forbidden because they want to keep everything as it is (including all merge commits), no rewrites allowed…

Categorie: Development

0 commenti

Lascia un commento

Segnaposto per l'avatar