Often when using Git Gui I would like to reset/checkout a single file or just dismiss a hunk.
Is there a way to do this easily in Git Gui? If not, is there any particular reason that this feature is not available in Git Gui?
Try Git checkout --<file> to discard uncommitted changes to a file. Git reset --hard is for when you want to discard all uncommitted changes. Use Git reset --hard <commit id> to point the repo to a previous commit.
Step 1. Click on the Web IDE option on the commit information panel, this would ideally take you to the editor panel with the repo structure listed on the left blade. Step 2. Click on the directory you wish to delete and commit the new changes and merge with the other branches if required.
I had a same problem. Just found it out: CTRL+J or Commit - Revert Changes
Alternatively, you can use the keyboard shortcut Ctrl+J to trigger the same action on Windows.
I know this way:
git checkout $REVISION -- $FILENAME
The chosen file will be checked out to HEAD
revision
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With