![]() ![]() *Disclaimer: This site is not intended to be an exhaustive reference. # repeat checkout/reset/clean for each borked branch All complaints about the use of sudo in this joke can be directed to him.įor real though, if your branch is sooo borked that you need to reset the state of your repo to be the same as the remote repo in a "git-approved" way, try this, but beware these are destructive and unrecoverable actions! # get the lastest state of origin But seriously though, on what fucking planet does checkout - make sense as the best way to undo a file? :shakes-fist-at-linus-torvalds: Fuck this noise, I give up. When I finally figured this out it was HUGE. Git commit -m "Wow, you don't have to copy-paste to undo" # the old version of the file will be in your index Oh shit, I need to undo my changes to a file! # find a hash for a commit before the file was changed You can also revert a single file instead of a full commit! But of course, in true git fashion, it's a completely different set of fucking commands. Turns out you don't have to track down and copy-paste the old file contents into the existing file in order to undo changes! If you committed a bug, you can undo the commit all in one go with revert. # follow prompts to edit the commit message
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |