Excrubulent
Excrubulent

Reputation: 467

SourceTree not using git-ref-format branch name when pushing - is my workaround correct? Is there a better way?

So I appear to be experiencing something similar to this known bug: https://jira.atlassian.com/browse/SRCTREEWIN-8304

It's not exactly the same bug apparently, the symptoms are almost identical, but it doesn't happen when creating a stash, but when pushing to a remote repo, in this case BitBucket.

Now, I'm not terribly well-versed in DVCS stuff, but here's what's happening for me, and my hacky fix that I hope won't bite me in the ass later:

When I press the button to push a commit, I see this dialog, note the overly long branch names:

Push Dialog with Bad Branch Names

When I hit Push on that dialog, I see this:

Error Message when Pushing

Then I can go back to the Push dialog and change the branch names like so:

Push Dialog with Fixed Branch Names

Then when I hit push, I get this success message:

Push Success Message

So that all LOOKS great, but I want to know if my fix is a good one. If I accidentally add a typo into one of the branch names, will it break my repo? Is there a better way to deal with this issue? Am I creating problems for myself down the line?

Upvotes: 2

Views: 6334

Answers (1)

VonC
VonC

Reputation: 1323343

Yes, your workaround is correct: you renamed the branch.

If I accidentally add a typo into one of the branch names, will it break my repo

No, your repository will be fine.
Double-check the status of your repo in command line with a

git branch -avv

You should not see any other branches with a "long name".

As for stashing, I prefer committing: see "git reset --soft as stash replacement and undo": a commit is safer and much harder to lose (compared to a stash pop that goes wrong)

Upvotes: 2

Related Questions