Git rebase takes a branch (the most common use), a tag, or a commit ID to rebase on top of.You can also pass the –rebase option to git pull, causing it to perform a rebase instead of merging the upstream changes into your local branch. Once you’ve shared changes with another developer, the headache is generally not worth the trouble. There’s a simple rule of thumb with git rebase: use it as much as you want on local commits.
This can cause problems for other developers who have your code because the IDs don’t match up.
The parent commit changes so all the commit IDs are recalculated. Rebase takes a series of commits (normally a branch) and replays them on top of another commit (normally the last commit in another branch). Using git rebase, you can rewrite the history of a repository in a variety of ways.