4 ms·
Hmmm.... - reset: "blindly" load whatever commit you tell it into your working directory. This is the one if you add "--hard" will plow over your working d
by spookthesunset 5y ago
Hmmm....
- reset: "blindly" load whatever commit you tell it into your working directory. This is the one if you add "--hard" will plow over your working directory in a way that cannot be undone. Actually I think without the "--hard" it won't make any changes to your working directory, it will treat whatever is in said directory as a change from the commit you told it to reset to. Dunno... have to look into it.
- revert: Creates a new commit that undoes whatever commit you pass in. Often times people mistakenly use this to "undo" a merge into a production branch that shouldn't have happened. The result is trouble when they want to push those changes back into production again.
- restore: I have no clue what this does.
All I really know is "--hard" is one of like two commands that you can do in git that you can't back out of. "git clean" is another one (I think).
Yeah... conceptually Git is kinda easy but the command line is pretty nuts.