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 382
    • Issues 382
    • 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
  • #1872
Closed
Open
Issue created Aug 02, 2015 by Sven Strickroth@mrtuxOwner

Rebase edit doesn't amend files but only the commit message

By vvv... on August 22, 2013 13:45 (imported from Google Code)


Lets suppose the user wants to alter some history, not only the commit messages but some files as well (e.g. typo fix in source).

With command line git this is done intuitively:

  1. git rebase -i ...
  2. Mark relevant commit with "edit".
  3. Rebase stops at the relevant commit. Then, user can amend it as desired in the following way:
    a. Edit the working tree for any additional changes desired to be included in the commit.
    b. "git add" any files changed.
    c. git commit --amend
    d. git rebase --continue

However, in TortoiseGit the intuitive way doesn't work:

  1. Start rebase.
  2. Mark relevant commit with "edit".
  3. Rebase stops at the relevant commit and continues when user clicks "Amend". But the Amend effects only the commit message. Any changes to the working tree are ignored.

Of course there is a workaround to this. Once TortoiseGit stops at relevant commit, the user can edit the working tree and amend the commit manually using the Commit dialog prior to clicking the "Amend" button on the Rebase dialog. However, this creates another issue, effectively, amending is done twice in such scenario. First time in the Commit dialog and second time in the Rebase dialog. If the user changes the commit message, it requires coping it manually to the Rebase dialog, otherwise the second amend reverts to original commit message.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking