User Tools

Site Tools


git_github_workflow

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
git_github_workflow [2018/12/06 16:46]
rpjday
git_github_workflow [2020/01/27 13:30]
rpjday [Overview]
Line 1: Line 1:
 ===== Overview ===== ===== Overview =====
  
-Typical workflow for contributing to a public GitHub project, demonstrating the use of branches and remotes.+Typical workflow for contributing to a public GitHub project, demonstrating the use of branches and remotes. For this demonstration,​ I'll use a Git Hub project I've been contributing to recently -- [[https://​github.com/​containers/​libpod]] -- which is the source of the Docker lookalike ''​podman''​ command.
  
 ===== Steps in the workflow ===== ===== Steps in the workflow =====
Line 121: Line 121:
  
 <​code>​ <​code>​
-$ git checkout -b sillyb +$ git checkout -b topic/​rpjday/​issue42 
-Switched to a new branch 'sillyb'+Switched to a new branch 'topic/​rpjday/​issue42'
 $ $
 </​code>​ </​code>​
Line 129: Line 129:
  
 <​code>​ <​code>​
-$ git checkout -b sillyb +$ git checkout -b topic/​rpjday/​issue42 
-Switched to a new branch 'sillyb'+Switched to a new branch 'topic/​rpjday/​issue42'
 $ $
 </​code>​ </​code>​
  
 <​code>​ <​code>​
-$ git commit -a -m "silly change+$ git commit -a -m "fix issue42
-[sillyb ​77fad5f] ​silly change+[topic/​rpjday/​issue42 ​77fad5f] ​topic/​rpjday/​issue42
  1 file changed, 1 insertion(+),​ 1 deletion(-)  1 file changed, 1 insertion(+),​ 1 deletion(-)
 $ $
Line 143: Line 143:
 <​code>​ <​code>​
 $ git show $ git show
-commit 77fad5f0aadd229628baa7811b0b49c7580d96f0 (HEAD -> sillyb)+commit 77fad5f0aadd229628baa7811b0b49c7580d96f0 (HEAD -> topic/​rpjday/​issue42)
 Author: Robert P. J. Day <​rpjday@crashcourse.ca>​ Author: Robert P. J. Day <​rpjday@crashcourse.ca>​
 Date:   Wed Feb 14 07:06:42 2018 -0500 Date:   Wed Feb 14 07:06:42 2018 -0500
  
-    ​silly change+    ​fix issue42
  
 diff --git a/​README.asc b/​README.asc diff --git a/​README.asc b/​README.asc
Line 165: Line 165:
  
 <​code>​ <​code>​
-$ git push origin ​sillyb+$ git push origin ​topic/​rpjday/​issue42
 </​code>​ </​code>​
  
git_github_workflow.txt · Last modified: 2020/01/27 17:03 by rpjday