Understand how does git rebase work and compare with git merge and git interactive rebase

Git rebase tutorial

Intro

Git rebase tutorial

Git rebase:

Git rebase
git checkout feature-branchgit rebase your-main-branch(for example master or develop)
git add
git rebase --continue
git rebase --skip

Git interactive rebase:

Git interactive rebase
git checkout feature-branchgit rebase -i your-main-branch(for example master or develop)
-pick, you will keep and push commit to the main-reword, you will change the message of the commit-edit, that means you will be able to edit the commit-squash, commits with that method will be squashed into one-fixup, similar to squash, but you will delete log of the commit-drop, it will remove a commit

Git merge

Git merge
git checkout feature-branchgit pull origin your-main-branch(for example master or develop)
git checkout feature-branchgit merge your-main-branch(for example master or develop)
Programming courses online

Core developer in www.duomly.com - Programming online courses