Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bug with default push behavior #1209

Closed
cauerego opened this Issue Aug 31, 2012 · 2 comments

Comments

Projects
None yet
2 participants

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'

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

Member

KindDragon commented Aug 17, 2013

Duplicate

@KindDragon KindDragon closed this Aug 17, 2013

@PKRoma PKRoma pushed a commit to PKRoma/gitextensions that referenced this issue Aug 20, 2014

@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