![]() ![]() Take a look at the below example illustrating a dirty Working Tree including changes staged for commit. And just like the official documentation states, restore doesn't update your branch (i.e. ![]() If, and when, that happens, restore is your weapon of choice.Īlthough restore has a multitude of use cases, in its simplest form it's used to remove changes from the Staging Area, or to discard changes made to your Working Tree. Not doing so might cause you to add files by accident which you don't want to commit. isn't something I'd recommend doing, as it's generally better to be more selective in what files to stage. ➕ Removing an accidentally staged file (restore) With the general command description from above top of mind, let's see how they differ in reality. Ok, still not crystal clear? Let's contextualize the above statements and solve our initial problems using them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |