Collaborating with Git & Github
• 1 min read
# Git Collaboration
git branch
git checkout
git merge
# Start the Repo, clone master
1. Create git repository on github
2. Connect/clon locally
3. Set up the code base
- git add -A
- git commit -m "initial commit"
~~
4. Clone the repository
- don't forget to npm install and create any other ignored files
- git clone <pasted command github>
5. Create a feature branch
- git branch server-setup
6. Checkout to that branch
- git checkout server-setup
7. Commit and push branch to github
8. git checkout master
9. Pull down remote master
- git pull
10. Checkout back to local branch
- git checkout server-setup
11. Merge local master into local branch
- git merge --no-ff master
- if this goes well
- shift + ZZ
- if it goes badly
- resolve conflicts locally
12. push branch to github
- git add -A
- git commit -m "initial commit"
- git push
13. Create PR on github
14. Git checkout to master and git pull