Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug with default push behavior #1209

Closed
cauerego opened this Issue · 2 comments

2 participants

@cauerego

First, couple ideas on how to fix it:

  • Either have a feature to push like git push, which will not screw up everything!
  • Or, at very least, the default would be to push current branch only, like git push origin branch.

I believe the issue arises when you have a bare repository with more than 1 branch, but I haven't tried all that much.

Currently the default behavior is an to attempt to push all, something that must be like git push origin *:refs/heads/*, no idea why.

What happens with this is it gives a warning (depending where you try to push, not even that) and if you go with it (so, at least if there's the warning it does reduce a little tiny bit the issue) you'll then get all branches duplicated twice, both in the destination and locally.

Let's say we have 2 local branches called master and another. And the default origin set for pushing. After a regular push we'd also find origin/master and origin/another.

But after the doomed push, we'll find duplicated origin/master and origin/another plus origin/refs/heads/master and that's also duplicated. For every extra branch. And it's not like we're pushing all branches or something, nor are we using Multiple Branches feature.

To "fix" it after its messed up, it's always a pain and I still couldn't find a workflow... But at least it's fixable. If however I don't go to fix it (beyond the mess) we can't git push any more without getting this error:

Pushing to \\\server\git\repo
error: dst refspec refs/heads/another matches more than one.
error: failed to push some refs to '\\\server\git\repo'
@cauerego

Why is this marked as feature-request?! This is a bug!!

@KindDragon
Owner

Duplicate

@KindDragon KindDragon closed this
@PKRoma PKRoma referenced this issue from a commit in PKRoma/gitextensions
@jbialobr jbialobr Remote branch autofill corrected. Closes #1209, #2001. 90b3acd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.