-
Notifications
You must be signed in to change notification settings - Fork 39
Triangular Workflow
This workflow is an adaptation of GitHub triangular workflow.
Press Fork button in Py-ORBIT. Now you have your own copy (fork or clone) of Py-ORBIT repository. This repository is called origin in this guide. The main Py-ORBIT repository is called upstream. So origin is a clone of upstream.
In a terminal session on your local computer run following:
git clone https://github.com/<your-GH-username>/py-orbit.gitNow you have a clone of origin on your local computer in py-orbit directory.
You need a way to get modifications that happened upstream, i.e. made by other people.
cd py-orbit
git remote add upstream https://github.com/PyORBIT-Collaboration/py-orbit.git
git remote -vYou should see that you got a new remote called upstream. Now you need a local branch that will track the upstream master.
git fetch upstream
git branch --track upmaster upstream/master
git branchNow your upmaster branch tracks upstream/master.
git checkout -b new-featureModify code, create more branches as needed etc. When you are done with your development and ready to share make sure that all changes are in your feature branch new-feature.
You need to check if someone updated upstream while you were developing your new feature.
git checkout upmaster
git fetch upstream
git diff --name-only usptream/masterWill give a list of files that are different in upstream. Merge them in your local repository in branch upmaster (if the list is not empty).
git merge upstream/masterNow your upmaster branch in your local repository has all modifications from upstream.