I want to be able to do the following:
Create a local branch based on some other (remote or local) branch (via git branch
or git checkout
I suppose that you have already cloned a project like:
git clone http://github.com/myproject.git
Then in your local copy, create a new branch and check it out:
git checkout -b
Supposing that you made a "git bare --init" on your server and created the myapp.git, you should:
git remote add origin ssh://example.com/var/git/myapp.git
git push origin master
After that, users should be able to
git clone http://example.com/var/git/myapp.git
NOTE: I'm assuming that you have your server up and running. If it isn't, it won't work. A good how-to is here.
Add a remote branch:
git push origin master:new_feature_name
Check if everything is good (fetch origin and list remote branches):
git fetch origin
git branch -r
Create a local branch and track the remote branch:
git checkout -tb new_feature_name origin/new_feature_name
Update everything:
git pull