Local branch name conflicts with remote branch name
See original GitHub issueOk so i was trying to push files into my repo
and i came across this thing
So i tried to pull, but when i tried that
Can anyone help me? Please?
Can’t do pull request either, same error for some reason…
Thanks niik, i made new branch oof
and made it default, then deleted master branch and now it works.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What to do with remote branch that has Conflict in the name?
Remote branch names are normally managed on the remote. That is, you can do this: git branch -r -d "b1 - Conflict On...
Read more >Manage Branches and Resolve Conflicts in Git - Cloudways
Learn how you can manage Git branches and resolve conflicts in this ... Once done, pass the branch name with git command to...
Read more >Creating and Merging Conflicts on Git Branches - GitHub Pages
Create a new git branch called planets-before-merge-conflict by running ... When you push a branch to a remote git repo, you can give...
Read more >Git in Visual Studio is not correctly handling branches with ...
When multiple branches on remote Git server have same name but different cases (e.g. features and Features), VS cannot recognize it correctly and...
Read more >Git: Guide to Solving Merge Conflicts - Stack Abuse
Merge Conflicts arise when multiple agents modify the same part of a file and push their changes to a remote branch. When you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe what has happened is that a branch with the same name as your local branch was either created on, or already existed on the server/remote when you created your local branch. That branch on the remote had diverged from your local branch such that a fast-forward push was impossible.
Steps to reproduce
test
and create one dummy committest
and create one dummy commitAlternative steps to reproduce
We should certainly be doing a better job of handling this scenario and describing what’s going on but the easiest way forward for you right now would be to rename your local branch by going to the
Branch
menu and clicking onRename...
and then publishing your new branch.@desktop/core I think that, at a minimum we should alert users if they’re creating a branch with a name that conflicts with an already existing branch on the remote. More long term we should probably have messaging that’s closer to 'There’s already a branch on the remote named
foo
. ’ rather than the generic messaging we have now.@Daniel-McCarthy thank you! i think something closer to the first approach would be fine, so long as it can handle a “default” remote who’s name isn’t
origin