An Interest In:
Web News this Week
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
Multiple developers work simultaneously using their own branch on git
1. Create a new branch:
git checkout -b yong-active-members-dev
Switched to a new branch 'yong-active-members-dev'
yongchanghe@MacBookPro 868_class_project_civitas_practice_repo % git push origin yong-active-members-dev
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: Create a pull request for 'yong-active-members-dev' on GitHub by visiting:
remote: https://github.com/hyc0812/868_class_project_civitas_practice_repo/pull/new/yong-active-members-dev
remote:
To https://github.com/hyc0812/868_class_project_civitas_practice_repo.git
- [new branch] yong-active-members-dev -> yong-active-members-dev
2. Check Which branch is currently used:
git branch -a
master
- yong-active-members-devremotes/origin/HEAD -> origin/masterremotes/origin/masterremotes/origin/yong-active-members-dev
3. Develop the new branch and commit the changes
4. When complete, go back to master branch
git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
yongchanghe@MacBookPro 868_class_project_civitas_practice_repo % git pull origin master
From https://github.com/hyc0812/868_class_project_civitas_practice_repo
- branch master -> FETCH_HEADAlready up to date.
5. Merge your branch to master
git merge yong-active-members-dev
Updating 98f2681..4fdc41c
Fast-forward
src/app/demo/dashboard/active-members/active-members.component.html | 1 +
1 file changed, 1 insertion(+)
6. Push to master branch
git push origin master
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/hyc0812/868_class_project_civitas_practice_repo.git
98f2681..4fdc41c master -> master
yongchanghe@MacBookPro 868_class_project_civitas_practice_repo %
Original Link: https://dev.to/yongchanghe/multiple-developers-work-simultaneously-using-their-own-branch-on-git-4c8c
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To