How to rebase chain of git changes on master ?

 If you have splitted your commit in a chain and asume something is changed on master. Here is easiest trick to rebase on master. 

1. Checkout topmost change in change branch like 

git fetch ssh://gitrepoexample/changes/00/00000/0 && git checkout -b change-000000 FETCH_HEAD

2. Now rebase your branch on master 

git rebase master 

3.  Ammend your last change and push 

git commit --amend && git push origin HEAD:refs/for/master 


All done. Best of luck.

Comments

Popular posts from this blog

input stream or file to X509Certificate