I want to be able to do the following:
Create a local branch based on some other (remote or local) branch (via
git branch
orgit checkout -b
)Push the local branch to the remote repository (publish), but make it trackable so
git pull
andgit push
will work immediately.
How do I do that?
I know about --set-upstream
in Git 1.7, but that is a post-creation action. I want to find a way to make a similar change when pushing the branch to the remote repository.
Simply put, to create a new local branch, do:
To push it to the remote repository, do: