Push dialog defaults to /refs/tags/<branchname>
已回答
Sometimes when i create a new branch in my project de Push dialog defaults to push my new branch to /refs/tags/<branchname> which creates a tag with the branchname.
I wish to push to the branch, not create a tag.
How do I change this? I can manually change this, but I have to remember to do this every time. The default should be push to the branch.
请先登录再写评论。
Hi,
Check by command: git branch -vv, most likely this one is tracked by default in git and has to be changed.
Not sure what I'm suppose to see there
This looks good to me
If you go to git config file, (in your .git folder), are there any pushURL or fetch values defined?
If so, replace them with refs/heads instead of tags.
this is my git config for the project
Does it always reproduce?
Can you share the screenshot of branch popup window?
How does it reproduce for the newly created branch? Do you push it and then it appears?
Also, another thing to note, your CMD shows that development branch is pushed and tracked but your local git config does not have this.
Can you check your global git config? Is the branch defined there?
For this project yes, I have this issue on some other projects, but not always
When I click the ‘Push..’ button (or Ctrl + Shift + K), then it's wrong. I've tried restarting PHPStorm multiple times, still the same issue.
My global git config
This is quite strange.
git branch -vv shows that you have both master and development pushed and tracked, while both git local config file and global file have no information about “development” branch.
Is the development branch currently pushed? Can you do git branch -vv inside the IDE terminal?
yes
I did that the first time, so the result can be found above
I did a recheck of the project git config file, today it looked like
I don't know if i maybe shared the wrong config????
I changed
push = refs/heads/master:refs/heads/master
topush = refs/heads/*:refs/heads/*
And now it works ;)
hooray, :D That was it then. Thanks for the update.