Remove and Revert Uncommitted Git Changes & Files

preview_player
Показать описание
Need to revert uncommitted Git changes from your workspace? You can revert uncommitted changes in Git simply by issuing two commands.

The first remove uncommitted changes Git command to use is reset:

git reset --hard

This will revert uncommitted git changes to tracked files, which includes any modified file that already existed in your repo, and any new files that were added to the index. But this will not Git remove uncommitted changes to new files that have not been added to the index. To remove uncommitted Git files that are new and untracked, you need the final git clean command to bring your workspace back to a pristine condition:

git clean -fdx

And that's is. That's all you have to do to remove, remove and revert uncommitted Git changes.
Рекомендации по теме
Комментарии
Автор

Thanks for everything. It was really helpful. God bless you!

lester_cch
Автор

thank you for this video, saved me !!!!

Arinze