Tagged with github

Creating a branch of a repo on GitHub

This is a simple thing, but it took me some digging to find some straightforward instructions.  For my own future use and hopefully to save some others the same searching here they are:

1. Make sure your local repo is up to date 

git pull origin master

 2. Create a local branch

git checkout -b [local branch name]

3. Perform your changes to your new local branch.

4. When ready to commit to github:
- If you want the github branch name to match your local name:

git push origin [local branch name]

- If you want the github branch name to be different than the local name:

git push origin [local branch name]:[remote branch name]

Also, as a bonus, to delete a remote branch use:

git push origin :[remote branch name]

Thanks to Joe Savak and his post here which I based my instructions on.
Tagged , , ,