Off-topic: Github question

3 views
Skip to first unread message

Graeme Defty

unread,
Mar 20, 2011, 10:02:55 PM3/20/11
to Neotoma
Sorry if this is a little off-topic, but I would like to pull Seans latest updates into my fork. Is there a way to do this dirctly with github, or do I have to clone his repo to my local machine, merge the changes into my local repo and the push to my branch on github?  If it is the latter, then I may as well delete my fork and re-fork, AFAICS.

Thanks,

g

Sean Cribbs

unread,
Mar 21, 2011, 1:38:04 AM3/21/11
to neoto...@googlegroups.com
1) Create a branch from your changes:
git branch graemes-tweaks

2) Push that branch to github:
git push origin

3) Now reset your master branch to match the last common commit between the two:
git checkout master
git reset --hard 30e99b7272ff39b106af # that commit hash just a guess

4) Push the changed branch to github:
git push -f origin master # -f is for "force"

5) Pull changes from my repo:
git pull seancribbs master

6) Push to your repo master branch
git push origin master

These kinds of acrobatics are why I always suggest doing work on
feature/topic branches -- they make it easier to merge your own
repository with mainline.

Cheerr

Graeme Defty

unread,
Mar 21, 2011, 9:34:39 PM3/21/11
to neoto...@googlegroups.com, Sean Cribbs
Sean,

Thanks. I feel much better about not being able to find a way to do this directly in github!

g
_____________________________________________
Reply all
Reply to author
Forward
0 new messages