Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Git Fork a Repository

20190611 A common workflow is to fork someone's original repository, make changes, and submit a pull request to the original repository for them to consider incorporating it into their main code base. You can fork the original repository through the github interface.

Once forked, clone the fork to your local machine and link it to the upstream repository:

$ git clone git@github.com:gjwgit/pygymn.git 
$ cd pygymn
$ git remote add upstream https://github.com/simonzhaoms/azface.git
$ git remote -v

Fetch updates from the upstream repository:

$ git fetch upstream

We can view all branches including those from upstream:

$ git branch -va

Now checkout your local main branch and merge from the upstream repository:

$ git checkout main 
$ git merge upstream/main

You may want to create a new named branch (give your branch its own simple informative name) within which to work, though this is optional:

$ git branch newfeature
$ git checkout newfeature

Once you have made your local changes, committed them and pushed to your repository, you can submit a git pull request to the upstream repository.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.