-
Notifications
You must be signed in to change notification settings - Fork 541
Pushing a repo on master works, but using references/branches seems to fail #684
Comments
Hey @dbriesz, If you get an "already up-to-date" it means that the reference on the remote already contains the commits you are trying to push. Unless you know for sure that there are changes locally on your |
Hey @orirawlings, Yes, I know for sure that local changes aren't in the remote branch since I'm trying to push a branch that I have locally to an empty remote branch |
Hey @dbriesz, I did some more troubleshooting on this. I'm not able to reproduce, although perhaps the error message is a little confusing when the branch you're trying to push does not exist either locally or on the remote (i.e. I'm running this code based on the latest changes in
When I try the push without the branch locally or on the remote:
When I create the branch locally and reattempt, the push succeeds without error:
When I reattempt after both the local and remote have the branch:
In the specific example you posted above @dbriesz, the branch in question does exist on that particular git repository:
So the trouble you are having might just be the particulars of the local and remote repository states. I think something that would be a potential improvement here for
|
Thanks @orirawlings. I'm trying a similar solution on my end, but I'm unable to get this code to work:
This results in the error
Is there another way to get a list of references from the Remote? |
Sorry. I'm using a new feature in that example code that hasn't yet been published to the |
Thanks - what is the proper way to use |
If you've retrieved the code using
|
Thanks, that worked! I had been using
Also, as an unrelated question, when might master be the new released version of go-git? Thanks for your help! |
Steps to reproduce:
• Add a downstream remote (r.CreateRemote)
• Push https://github.com/src-d/go-git.git-> works
• Push https://github.com/src-d/go-git.git/fix/checkout-empty-repo -> results in "already up-to-date"
Example code:
• Push with refs/heads usage also fails
Example code:
The text was updated successfully, but these errors were encountered: