-
Notifications
You must be signed in to change notification settings - Fork 18
Git workflow for team
HP Marshall edited this page Jun 23, 2019
·
3 revisions
$ git clone https://github.com/ICESAT-2HackWeek/topohack.git
$ cd topohack
$ git checkout -b branch_name
Make changes or add new files.
$ git add new_file #if adding a new file
$ git commit -am "Make changes"
$ git push origin branch_name
Complete pull request and merge with master via GitHub UI.
Switch back to the master branch.
$ git checkout master
Check that you are on the master branch.
$ git branch
Now delete the branch. This will delete it on GitHub (remote) and locally (not needed if you click the "delete branch" button on github page).
$ git push origin --delete branch_name
Finally, git pull all the latest changes (yours and others) to your local master branch.
$ git pull
(HP) I had to do one more step to delete my branch locally:.
$ git branch -d branch_name
When you are ready to do more work, checkout another branch and repeat.