
Git workflow with remote branch and fork...
Developers work differently with git. Some prefer to work directly off the main repo and create their own branch, merge it with master after committing the work. On the other hand, there are professionals in our field, who insist on forking the main repo and then work from the forked repo. Once dev branch in the forked repo is committed, then push those changes to original repo's dev branch.
Developers work differently with git. Some prefer to work directly off the main repo and create their own branch, merge it with master after committing the work. On the other hand, there are professionals in our field, who insist on forking the main repo and then work from the forked repo. Once dev branch in the forked repo is committed, then push those changes to original repo's dev branch.
Here are steps one can take to achieve the workflow using git and remote branches:
Step 1) Checkout new branch git checkout -b new-branch
Step 2) Make changes
Step 3) Add to git git add .
Step 4) Commit git commit -m "Made changes!" or git commit -a
Step 5) Push to your repo git push origin new-branch
Step 6) Make PR from pushed branch
Step 7) Merge into dev after it passes tests
http://jenkins.corp-domain.local/job/AwesomeProject0/
Click "Scan Repository Now"
Step 8) Make PR from dev into master
Step 9) Merge dev into master once tests pass
Step 10) Update local copy and remote fork
git checkout master -> git pull upstream master -> git push origin master
git checkout dev -> git pull upstream dev -> git push origin dev
Rebase/Upstream
git remote add upstream https://github.corp-domain.com/DataScienceSourceCode/AwesomeProject0.git
git remote -v
git fetch upstream
Check out your fork’s local master branch by issuing git checkout master
Merge the changes from upstream/master into your local master branch by issuing git merge upstream/master
git push
Leave Git workflow with remote branch and fork... to:
Read more #git posts
Best Posts From rajib2k5
We have not curated any of rajib2k5's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From rajib2k5
- My Actifit Report Card: October 1 2022
- My Actifit Report Card: September 28 2022
- My Actifit Report Card: September 23 2022
- My Actifit Report Card: September 20 2022
- My Actifit Report Card: September 16 2022
- My Actifit Report Card: September 12 2022
- My Actifit Report Card: September 11 2022
- Gotta stay away from Ever things
- My Actifit Report Card: May 20 2021
- My Actifit Report Card: May 19 2021