$ 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.

https://medium.com/@harishlyadav/when-to-use-git-rebase-explained-3c8192cba5c7

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