24 Sep '13, 1pm

Como manter o seu fork no github atualizado

dancroak May 2, 2011 git shell unix I forked a GitHub repo thoughtbot/dotfiles to croaky/dotfiles and want to keep the fork updated. Track After I forked the repo to your Github account, I did this one time: git clone [email protected]:croaky/dotfiles.git cd dotfiles git remote add upstream [email protected]:thoughtbot/dotfiles.git Update Each time I want to update, from my local master branch: git fetch upstream git rebase upstream/master The goal of the rebase is to have a cleaner history if I have local changes or commits on the repo. It’s the difference between the the left and the right in the image below. Commit rights upstream? If I also have commit rights to the upstream repo, I can create a local upstream branch and do work that will go upstream there. git checkout -b upstream upstream/master

Full article: http://robots.thoughtbot.com/post/5133345960/keeping-a-gi...