# positioned in parent folder /Users/testuser/GH_test/
git clone https://github.com/Lulliter/nerd_help.git
cd nerd_help
Git collaboration
Caution
Web page construction in progress…
Collaboration
I create a test GH account lula-test (associated to l__a__a@icloud.com)
I clone in
/Users/testuser/GH_test/nerd_help
this repository “nerd-help” I own as Lulliter and (from there (I indicated that lula-test is a collaborator)
Rules
- THE MASTER BRANCH SHOULD ALWAYS BE DEPLOYABLE
you create new branches for new features and merge them into Master when they’re completed.
It’s also important when collaborating that your team picks features that don’t have overlapping code.
- Here I create a new branch colors_page and I go there
# I create a new branch to add a color.qmd page and switch there
git checkout -b colors_page
# verify this with the command:
git branch
- “checkout” is used to switch between branches. Adding the “-b” and a name at the end creates a new branch and then moves into that new branch for us.
In the branch, the collabrorator
- makes some changes …
- add + commit + push
3.b Wait
Even if I am in the collaborator GH, lookg like the remote is considered the owner GH
git remote -v
# origin https://github.com/Lulliter/nerd_help.git (fetch)
# origin https://github.com/Lulliter/nerd_help.git (push)
so I must change te origin in the collaborator GH
git remote set-url origin https://github.com/lula-test/nerd_help.git
Reference
- Blog on collab
- The Pragmatic Git blogsite
- Tutorials