So the dev project I’m working on is going two separate paths. My co-worker is looking at more of the ajax/look & feel stuff while I’ll be working on the model (moving to postgresql). We might not bump into each other much, but better safe than sorry. So I’ll need to create a branch of our existing repository.
Here’s how (instructions were varied on the internets):
- Get the latest of your code: git pull origin master
- Create the branch on your local repo: git checkout -b <branchname>
- Make your changes (optional)
- Push the branch (creating it on github): git push origin postgresql
If someone else wants to work in your branch or you want to work on it in a different machine, here’s how to do that:
- git clone <project path>
- cd <project dir>
- Now when you do a “git branch -a”, master would show – but should would the other branches.
- To switch to a branch on your local repo, do “git checkout -b <branchName> remotes/origin/<branchName>