- I have a repo with a remote branch
master
and a local branchtemp
that I'm working in. - I'm working with gerrit, so pushing my local with
git push origin HEAD:refs/for/master
rather thangit push
. This has been working perfectly fine.
My temp
branch was setup to mirror the remote master
originally, but the remote master
is being abandoned, changed to work
.
So I ran these commands:
git branch --set-upstream temp origin/work
git commit
Both worked.
Now, I try git push origin HEAD:refs/for/work
It gets rejected, claiming I have no new changes.
Yet when I run git status
, it says my local branch is ahead of origin/work
by 1 commit.
I'm totally confused. Any ideas?
Additional Info
-I have also tried git rebase origin/work
with the temp
branch checked out, which resulted in: "Current branch temp is up to date.`
-svlasov, I tried your suggestion of:
git fetch origin
, thengit status
This tells me I am ahead by 1 commit.
Git Version
1.7.9.5