Remove and Revert Uncommitted Git Changes & Files

Описание к видео Remove and Revert Uncommitted Git Changes & Files

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.

Комментарии

Информация по комментариям в разработке