3 #+EMAIL: seudut@gmail.com
7 ** Update an forked repo on Github
8 See [[http://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository]]
9 #+BEGIN_SRC sh :results output replace
10 # Add the remote, called it "upstream", which is the original repo forked
12 git remote add upstream https://github.com/whoever/whatever.git
22 # rebase all commit in upstream
24 git rebase upstream/master
28 git push origin master
31 ** Move branch pointer to commit
32 Ususally, we create a branch for some bug fix. If it is a regress issue, we oftern need to rollback to some commit to fix the
33 bad commit. In this case, we need to move the branch to another commit
34 [[http://stackoverflow.com/questions/5471174/git-move-branch-pointer-to-different-commit-without-checkout]]
36 #+BEGIN_SRC sh :results output replace
37 git branch -f branch-name COMMIT