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

From GlueXWiki
Jump to: navigation, search
(Created page with "==The Workflow== # create local repository #* git clone https:/github.com/jeffersonlab/sim-recon # create a local topic branch #* git branch my\_work # move to the new topic...")
 
Line 1: Line 1:
 
==The Workflow==
 
==The Workflow==
  
# create local repository
+
Let's use the sim-recon repository as an example.
#* git clone https:/github.com/jeffersonlab/sim-recon
+
 
# create a local topic branch
+
# Create local repository in the current directory
#* git branch my\_work
+
#* <code>git clone https:/github.com/jeffersonlab/sim-recon</code>
# move to the new topic branch
+
# Create a local topic branch
#* git checkout my\_work
+
#* <code>cd sim-recon</code>
 +
#* <code>git branch my_work</code>
 +
# Move to the new topic branch
 +
#* <code>git checkout my_work</code>
 
# ... work on topic branch, make changes, add them, commit them...
 
# ... work on topic branch, make changes, add them, commit them...
# push local topic branch to public topic branch
+
# Push local topic branch to public topic branch
#* git push origin my\_work:new\_bug\_fix
+
#* <code>git push origin my_work:new_bug_fix</code>
#* creates branch "new\_bug\_fix" on public repository
+
#* creates branch "new_bug_fix" on public repository
# issue pull request
+
# Issue pull request
 
#* go to the GitHub site and log in
 
#* go to the GitHub site and log in
#* navigate to the branch, click on "pull request"
+
#* navigate to the repository page (https://github.com/JeffersonLab/sim-recon)
#* creates action item on GitHub
+
#* switch to the "new_bug_fix" branch (pull down menu)
#* requests that changes on branch "new\_bug\_fix" be merged onto master branch on public repository
+
#* click on "pull request"
# someone else acts on pull request on GitHub
+
#** creates action item on GitHub, a request that changes on branch "new_bug_fix" be merged onto master branch
 +
# Ask someone else to act on pull request. They
 
#* go to the GitHub site and log in
 
#* go to the GitHub site and log in
#* navigate to open pull requests
+
#* navigate to the repository page (https://github.com/JeffersonLab/sim-recon)
#* merge in changes
+
#* click on "pull requests" in the right-hand column
 +
#* fill in and submit web form to merge in changes
  
 
==Notes on this Workflow==
 
==Notes on this Workflow==

Revision as of 11:46, 14 July 2015

The Workflow

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

  1. Create local repository in the current directory
    • git clone https:/github.com/jeffersonlab/sim-recon
  2. Create a local topic branch
    • cd sim-recon
    • git branch my_work
  3. Move to the new topic branch
    • git checkout my_work
  4. ... work on topic branch, make changes, add them, commit them...
  5. Push local topic branch to public topic 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"
      • creates action item on GitHub, a request that changes on branch "new_bug_fix" be merged onto master branch
  7. Ask someone else to act on pull request. They
    • 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.