-
One team member forks or creates a new repo
-
All team members clone down the repo to their local machine
-
The owner of the repo proceeds to add their teammates as collaborators, on the repo page -> Settings -> Collaborators -> Add people
-
Avoid working on the Main branch, each team member should create their own branch locally:
git checkout -b name-branch
orgit switch -c name-branch
-
Avoid working on the same files/components simultaneously. Add, Commit, and Push your changes to github:
git push origin name-branch
-
Coordinate with your team when everyone can merge their branches in succession, and then proceed to pull down the updates merged on the Main branch,
git pull origin main
-
In github and locally delete the branches that were merged. In your terminal move to a different branch from the one you want to delete:
git checkout name-branch
orgit switch name-branch
Delete command:git branch -d name-branch
if you try to delete locally before you pulled down the updated main you will need to use the commandgit branch -D name-branch
-
Once the most up to date version of Main was pulled down, proceed to create a new branch locally and continue your work there. See steps 4-7