A few weeks ago i forked a public project on GitHub. Today, I wish to try some stuff on it BUT i want to make sure the copy I use is the most recent.
Can I update my fork, first?
And what happens if there's changes to the fork AFTER i've started my changes. Can i update my fork again, while leaving my changes in there (ie. merge, if needs be?)
To sync your forked repo with the parent or central repo on GitHub you: Create a pull request on GitHub.com to update your fork of the repository from the original repository, and. Run the git pull command in the terminal to update your local clone.
On GitHub, navigate to the main page of the forked repository that you want to sync with the upstream repository. Select the Sync fork dropdown. Review the details about the commits from the upstream repository, then click Update branch.
Simply push your development branch to the forked remote repository and create the pull request as described in the linked article. The owner of the original repository can then add your repository as a new remote repository, fetch your changes and merge your development branch back into the master branch.
Yeah you can pull
the changes from the original repo into your fork. Add a remote to it ( since origin will be your fork ) and pull.
This from GitHub help:
First up, add a remote to the original repo.
Help here: http://help.github.com/remotes/
Then you can pull in updates to the original repo. Quote from http://help.github.com/fork-a-repo/
Pull in upstream changes
If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:
$ git fetch upstream
$ git merge upstream/master
All these are for doing from command line.
Below are instructions for TortoiseGit:
Right click over your project -> TortoiseGit -> Settings -> Remote.
Add the remote details here:
Now, right-click -> TortoiseGit -> Pull.
You will be presented with a dialog to choose the remote ( you should be able to see the remote you added in previous step). Choose it and pull.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With