0

Im trying to make a copy of a repo I have access to. However when I fork it to my own account not all the latest changes come. For example the original has 840 commits and 7 contributors and my fork has only 733 and 4 contributors. Also the read me file is not updated.

How can I get a complete copy of all the changes/updates, etc?

(I am a newbie so I need very basic and simple instructions.)

Robert
  • 5,191
  • 43
  • 59
  • 113

1 Answers1

1

When you fork a repository it will only include the master branch by default. If you want the other branches the easiest thing to do is clone the forked copy to your workspace then add the original repository as a new remote. I usually do the following:

git remote add upstream url-to-original-repository
git fetch --all
git branch -a

That will list all the branches and you can checkout any of the upstream branches that are interesting.

Kyle Boon
  • 5,013
  • 6
  • 36
  • 50
  • Thank you very much Kyle for your answer. If you "clone" a copy to desktop will bring all the branches or its just the master also? – user3086199 Dec 10 '13 at 13:53
  • Just the master branch. Otherwise your options are to do a git fetch --all and/or add remote tracking branches. – Kyle Boon Dec 10 '13 at 14:49
  • This question as much more detailed explanation: http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git – Kyle Boon Dec 10 '13 at 14:57