Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3625
Closed
Open
Issue created Aug 10, 2020 by Pete Gonzalez@octogonzContributor

Commit dialog shows wrong branch after committing failed when new branch was specified

What steps will reproduce the problem?

  1. Make some changes, then right-click on a folder and choose "Git Commit" to open the Commit dialog
  2. Check the "new branch" checkbox
  3. Enter a branch name in the "Commit to:" textbox, for example my-branch
  4. Enter a description
  5. Click the "Commit" button -- and now suppose that this operation fails, e.g. because a Git precommit hook returned a nonzero exit code.
  6. Fix that problem, then try again by clicking the "Commit" button on the (still open) Commit dialog

What is the expected output? What do you see instead?

The operation should complete successfully.

What version of TortoiseGit and Git are you using? On what operating system?

Instead, the "new branch" checkbox shows a warning saying that my-branch already exists.

If you uncheck the "new branch" checkbox, then the "Commit to:" label shows the original branch (e.g. master) instead of my-branch. This is incorrect, because after successfully clicking the "Commit" button, you will find that your changes have indeed been committed to my-branch, and it is now the current branch.

Tortoise Git version: 2.9.0.0

Edited Dec 30, 2021 by Sven Strickroth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking