Do you know these important git commands?

Last updated by Tiago Araújo [SSW] 12 months ago.See history

Git Reset – Discard your local changes and revert to your last Commit

git reset 1
Figure: When trying to undo a change you will sometimes get errors. The answer is to exit Visual Studio and use the command line

git reset 2
Figure: use ‘git reset --hard HEAD’ to throw away all your uncommitted changes

Note: A common cause of Visual Studio failing to undo changes is an incomplete .gitignore file.

We open source. Powered by GitHub