this post was submitted on 20 Nov 2024
825 points (97.5% liked)
Programmer Humor
19623 readers
2615 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I think it’s important to know that this program is for code developers, and the issue here is with a tool called git. Git is like file saving on steroids, because on top of saving a single file, you save many changes to files in git, add a comment for why you made those changes, and share your changes across dozens of files with other developers.
What this guy did was develop for many months after starting to use git, but he never actually committed the files. Then he asked for to reset everything back to the original state, something that I do multiple times a day, and it gave him a warning that original means original and you will lose everything. And he said do it anyways.
No he asked for a discard after importing the project into VS Code. discard in git terms refers to
git reset
, notgit clean
. Even if he wanted to run agit reset
then this version of VS Code would have run agit clean
and deleted everything. Imagine he committed all 5000 files, but had a secret.json that he hadn't committed. He didn't add it to gitignore either. Running agit reset --hard
will not delete this file, but the VS Code button did exactly that because it ran agit clean
.