Top 5 reasons to choose ACCA

ACCA is one of the best educational qualifications one can invest on. The course contains deep knowledge that helps you land careers in Accountancy, Management and Consultancy. The ACCA course mainly…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Remove Unwanted Unstaged Changes in Tracked Files from a git Repository

This article demonstrates how to discard undesired, unstaged changes to tracked files in a git repository with git checkout so that they do not wind up in your next commit.

where pathspec can be a wildcard or file path value.

To discard changes to all unstaged files use the following command:

To discard changes to files by wildcard (e.g. by specific file extension type) use a command like this:

The above command resets all files with a .py extension to the index versions.

To discard changes for a specific file path, include the file path as the argument:

The above command will revert the file on the path somefile.py to the index version.

Add a comment

Related posts:

Uncomfortable Christmas

The holidays tend to bring people together — whether we appreciate being together or not. The traditional approach of navigating such togetherness is of course to avoid topics like politics and…

Apa jadinya Millenials tanpa Jaringan Internet?

Kalian kesel nggak sih kalau kalian udah enak-enak ngopi, tiba-tiba wi-fi nya rusak atau jaringan internetnya lambat? Ngeselin banget nggak sih? Rasanya saat ini ada yang kurang kalau tempat yang…

Associations in Sequelize

You wake up with your dream idea. You rush to the computer and flesh out how your paradigm-shifting, earth-shattering application will operate. Your magical wireframes are already luring your mind…