-
Notifications
You must be signed in to change notification settings - Fork 70
Workflow
Try to avoid push
to the main repo branches ( 🚫master
or 0.1.x
), and push
to your own fork. Then, open a pull request
that will be thoroughly reviewed by the admins and added.
First, fork the master repository to your Github (green button, upper right).
Then, in your terminal 💻:
$ git clone https://github.com/User_Name/PyFME.git
$ cd PyFME/
$ git remote add upstream https://github.com/AeroPython/PyFME.git
To add changes:
$ git checkout -b my-changes # Create a new working branch (local) to play around and test
# Then changes are made
$ git push origin my-changes # This "pushes" the changes to your own fork (aka Github)
Then create a pull request. The code will be reviewed 🔍. After it has been merged by the reviewer, your repo's master must be updated. In your terminal:
$ git checkout master # Switch to local master branch
$ git fetch upstream # Changes made to the original repo are collected
$ git merge --ff-only upstream/master # Updating! (from original repo's master branch)
$ git branch --delete my-changes # Working branch (local) is no longer needed.
$ git push origin --delete mis-cambios # Remote branch isn't needed neither, http://stackoverflow.com/a/2003515/554319
$ git push origin master # Updates fork (Github's)
If for any reason the merge of your pull request is delayed, it might happen that other pull request have indeed gone through the scrutiny and the remote master has changed. It is convenient to update our working branch, using git merge
†:
$ git checkout master # Switch to master branch (local)
$ git fetch upstream # Changes made to the original repo are collected
$ git merge --ff-only upstream/master # Updates master branch (local), changes made to the original repo are implemented
$ git push origin master # Updates master branch (remote, Github's fork)
$ git checkout my-changes # Switch to the working branch (local)
$ git merge master # Updates the working branch (local)
† For more information about this: https://www.atlassian.com/git/articles/git-team-workflows-merge-or-rebase/ with drawings and stuff: https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough