As with git checkout -- . , this only discards changes in tracked files.
Unstage the file to current commit (HEAD):. git reset HEAD
Make sure you are on the lastest commit in the master brach before you continue. Run: git checkout master. 02 Change hello.html. It happens that you modify a file ...
to update what will be committed) (use "git checkout --
This article demonstrates how to discard undesired, unstaged changes to tracked files in a git repository with git checkout so that they do not ...
Do a reset to go back to the state before your commit (be careful: the "--hard" option means the command will discard changes to tracked files after the specified ...
Scenario: You just ran git push , sending your changes to GitHub, now you
If you have modified, added and committed changes to a file, and want to undo those changes, then you can again use git reset HEAD~ to undo ...
Simple way to do this: Step 1: Revert modified files using the following command: $ git checkout -f. Step 2: Remove untracked files: $ git clean - ...
the .gitignore file to tell GitKraken to ignore files in your repo that you don't want to be tracked.