Hi,
I would like to suggest a feature to add two commands to the Source Control View Title Bar (the native VS Code SCM panel, located at the top where the "Commit" button is).
Currently, if I need to fix a commit or reset to the remote state, I have to use the terminal or switch to the Git Graph view. It would be much more efficient to have these options directly in the main Source Control panel.
Proposed Location:
VS Code Source Control Panel Title Bar (scm/title menu contribution point).
Proposed Commands:
- Amend Last Commit (修改最后一次 Commit 信息)
Action: Executes git commit --amend.
Functionality: Allows modifying the message of the most recent local commit.
Condition: Ideally only visible/enabled when the HEAD is a local commit (not yet pushed).
- Reset Soft to Remote (快速回退到线上版本)
Action: Executes git reset --soft origin/.
Functionality: Resets the local branch history to match the remote branch, but keeps all local file changes in the Staging Area (Index).
Use Case: This acts as a powerful "Uncommit All" button. It is very useful when I have made several local commits but want to undo the commit history to reorganize or squash them later, without losing any code changes.
Why this location?
The Source Control panel is the primary place for staging and committing. Adding these "correction" and "reset" tools to the title bar would significantly streamline the workflow for fixing mistakes or cleaning up local history.
Thank you for considering this feature!
Hi,
I would like to suggest a feature to add two commands to the Source Control View Title Bar (the native VS Code SCM panel, located at the top where the "Commit" button is).
Currently, if I need to fix a commit or reset to the remote state, I have to use the terminal or switch to the Git Graph view. It would be much more efficient to have these options directly in the main Source Control panel.
Proposed Location:
VS Code Source Control Panel Title Bar (scm/title menu contribution point).
Proposed Commands:
Action: Executes git commit --amend.
Functionality: Allows modifying the message of the most recent local commit.
Condition: Ideally only visible/enabled when the HEAD is a local commit (not yet pushed).
Action: Executes git reset --soft origin/.
Functionality: Resets the local branch history to match the remote branch, but keeps all local file changes in the Staging Area (Index).
Use Case: This acts as a powerful "Uncommit All" button. It is very useful when I have made several local commits but want to undo the commit history to reorganize or squash them later, without losing any code changes.
Why this location?
The Source Control panel is the primary place for staging and committing. Adding these "correction" and "reset" tools to the title bar would significantly streamline the workflow for fixing mistakes or cleaning up local history.
Thank you for considering this feature!