I'd like to push my current branch (hp1) with
git push
and not
git push origin hp1:team/hp1
The remote branch already exists.
My local branches:
develop
master
* hp1
git remote show origin tells me:
Remote branches:
develop tracked
master tracked
team/h2 tracked
team/hp1 tracked
team/n1 tracked
Local branches configured for 'git pull':
develop merges with remote develop
master merges with remote master
hp1 merges with remote team/hp1
Local refs configured for 'git push':
master pushes to master (up to date)
I already tried
git branch --set-upstream hp1 origin/team/hp1
and
git branch --set-upstream hp1 refs/remotes/origin/team/hp1
but both don't work.
My colleague has a local branch called as the remote branch (team/hp1) and the code above works for him. He gets at the end an additional
Local refs configured for 'git push':
develop pushes to develop (up to date)
master pushes to master (up to date)
team/hp1 pushes to team/hp1 (up to date)
So maybe you can tell me what's wrong and how to fix it.
EDIT my config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ***@***:***.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "hp1"]
remote = origin
merge = refs/heads/team/hp1