Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(setup): Remove step to hard reset this repo
This is a slightly embarassing story, but needs to be told for context. When I was creating my `dotfiles` repo, I copied the `initialize_git_repository.sh` from this repo. It worked as following: - Initialize git at the root of this project, if this is not a git repo - Add an origin URL as remote - Fetch the changes from origin/master - Run `git reset --hard origin/master` to mirror origin/master I created all the other files and tested it locally. More than 70% of my final work was done. And, then I ran the `setup.sh` script which called `initialize_git_repository.sh`. Since, I had not even initialized git in the repo (and thereby had not committed any changes), it ran all the above steps. As a result, I lost all my changes from the past more than 6 hours in under 5 seconds. It was devastating, to say the least. So, I'm removing the final step to hard reset because this could easily be weaponified to delete all the files on a computer. The user must run `git reset --hard` herself to be in full control. However one positive things came out out this and I learnt an important lesson. > Always backup your data, even when you don't!
- Loading branch information