DEV Community

Discussion on: Bash Functions & Git - How to wipe out changes made to a specific file

Collapse
 
oligospermia profile image
Mesalazine

Technically speaking, it is part of branch management: you are checking out = resetting a file (or files, as you can use * wildcards) to the original branch state.

Thread Thread
 
stephencweiss profile image
Stephen Charles Weiss

Got it. That makes a lot of sense. I'll update cpkg to git checkout -- package*.json.

Sometimes you just need to put things out there to have people show you a better way! Appreciate it!