git push NOT current branch to remote

git, git-push

Solution

With `git push` you can specify the remote and the local

git push remotename branchname

Problem

Is there a way in git bare repository to push a branch that is not in HEAD right now? For example i have two branches: ``` $ git branch * master another ``` And i have two remotes set: `origin` and `another`. I need to be able push from `another` to `another/another` just in one command without changing HEAD.

Original source

Related problems