Difference between revisions of "Instructions for Working with GlueX Git Repositories"

From GlueXWiki
Jump to: navigation, search
(The Workflow)
(The Workflow)
Line 21: Line 21:
 
#* fill in and submit web form
 
#* fill in and submit web form
 
#** creates action item on GitHub, a request that changes on branch "new_bug_fix" be merged into master branch
 
#** creates action item on GitHub, a request that changes on branch "new_bug_fix" be merged into master branch
# Ask someone else to act on pull request. They
+
# Ask someone else to act on pull request. Pull requesters cannot merge their own request. To do the merge:
 
#* go to the GitHub site and log in
 
#* go to the GitHub site and log in
 
#* navigate to the repository page (https://github.com/JeffersonLab/sim-recon)
 
#* navigate to the repository page (https://github.com/JeffersonLab/sim-recon)

Revision as of 13:58, 17 August 2015

The Workflow

Let's use the sim-recon repository as an example.

  1. Create local repository in the current directory
  2. Create a local branch
    • cd sim-recon
    • git branch my_work
  3. Check-out the new branch
    • git checkout my_work
  4. ... work on topic branch, make changes, add them, commit them...
  5. Push local branch to public branch
    • git push origin my_work:new_bug_fix
    • creates branch "new_bug_fix" on public repository
  6. Issue pull request
    • go to the GitHub site and log in
    • navigate to the repository page (https://github.com/JeffersonLab/sim-recon)
    • switch to the "new_bug_fix" branch (pull down menu)
    • click on "pull request"
    • fill in and submit web form
      • creates action item on GitHub, a request that changes on branch "new_bug_fix" be merged into master branch
  7. Ask someone else to act on pull request. Pull requesters cannot merge their own request. To do the merge:
    • go to the GitHub site and log in
    • navigate to the repository page (https://github.com/JeffersonLab/sim-recon)
    • click on "pull requests" in the right-hand column
    • fill in and submit web form to merge in changes

Notes on this Workflow

  • Everyone needs an account on GitHub.
  • Anyone can update the master branch.
  • Changes should go onto topic branches, but enforced only administratively.