I have needed to do that before when I fucked it up so badly that not only could I not revert but also couldn't find any solutions online. I was, in my defence, very early in the learning phase and not really understanding how anything worked yet.
The closest I've come is where I committed a >50MB <100MB file to my repo and didn't notice for a few days. Had to manually go in and purge the file from the history to unfuck the repo.
It definitely is. Even as a senior dev "git wizard" I'd rather wait 5 minutes recloning vs spend 20 untangling a ball of knots if it gets it to the desired state.
Yeah but you only add to track new files once. Otherwise -am that stuff. You don't need git add for tracked files, which hopefully most commits are and we aren't committing files in full all the time
View all comments
Show parent comment
74
u/Bubbaluke Oct 15 '26
Can’t mess it up if you only ever use 3 commands