2

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?

1 Answer 1

2

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)

8
  • I don't really know what you mean by "stashing". That link seems to refer to something different to what I'm talking about. I'm talking about after I've done a commit, I then want to push my changes to the remote repo, in this case bitbucket. As far as I know this is fairly standard usage. Commented Feb 17, 2018 at 8:51
  • Also the main question I asked was "is my workaround correct?", and I'm not sure that you directly answered that. Commented Feb 17, 2018 at 8:52
  • I can tell you that "git branch -avv" confirmed that the repo was fine. Commented Feb 17, 2018 at 9:03
  • @Excrubulent I was talking about stashing because of your link: jira.atlassian.com/browse/SRCTREEWIN-8304
    – VonC
    Commented Feb 17, 2018 at 9:17
  • 1
    @Excrubulent Yes, your workaround is correct: you renamed the branch.
    – VonC
    Commented Feb 17, 2018 at 9:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.