git rebase hard head code example
Example 1: git rebase
#The branches are like this
A---B---C topic
/
D---E---F---G main
#git rebase <base> <target>
git rebase master topic
#<target> get moved forward on <base>
#NOTE: commits on <target> change their hash
A°--B°--C° topic
/
D---E---F---G main
Example 2: git reset hard
git reset --hard f414f31
git reset --soft HEAD@{1}
git commit -m "Reverting to the state of the project at f414f31"
Example 3: git rebase
$ git rebase --onto master server client