Advertisement

Monday, November 18, 2019

DevOps: GIT : Fork Workflow

In this blog I am going to discuss on the workflow for Fork Request. 
A fork is essential a point in time copy of your master Branch which you create and then you can download the point in time copy and make changes to that copy.

Finally when you are happy (or not happy) you may - sync the downloaded fork with your main branch or upload changes to Fork and raise Pull request for the main branch. 

How to do so ? 

1. Create the Fork of Repository you  want from GitHub
2. Clone the forked repository now to your local
  git clone git@github.com:<username>/<repo_name.git>
3. Add Upstream to the Repo (this is used to sync with the main branch
  git remote add upstream git@github.com/<org_name>/<repo_nameg.git>

4. Checkout Branch
   git checkout -b < name >
5.  git add (or git add individual files)
6.  git commit
7.  git push origin HEAD
8. Create Pull Request
9. Compare and Merge 

That's it..

2 comments:
Write comments