Tuesday, January 14, 2014

Git - How to fork your own repository in Github

@You should fork from the your original project in advance.

@Make a clone of your project on your machine.
$ git clone https://github.com/YOURNAME/forkedrepo.git

@Add an upstream remote to your original repository.
$ git remote add upstream git@aaa.cccc.local:ORIGINALNAME/original.git

@Pull down a copy of the original repository to your new repository.
$ git fetch upstream






 


















$ git merge upstream/master



















Or, an easier way:
$ git pull upstream master

@Upload the fresh copy of your new repository back up to git
$ git push origin master 


No comments:

Post a Comment