When you are doing a feature development, typically there are many local commits which happen, its always a good idea that squash all those commits into one commit and then merge them to the master branch. Below are the steps to do the same #Step1 : Start git rebase in interactive mode $ git rebase -i master #once you do this, you will all your commits in an editor likewise pick 1b6f7fed87 feature1 pick 1b6f7fed85 old commit1 pick 1b6f7fed83 old commit2 pick 1b6f7fed81 old commit3 # Rebase 806f77feab..1b6f7fed87 onto 806f77feab (1 command) # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell # d, drop = remove commit # # These lines can be re-ordered; they are executed from top to bottom. # # If you remove...