• 0 Posts
  • 676 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle



  • No he asked for a discard after importing the project into VS Code. discard in git terms refers to git reset, not git clean. Even if he wanted to run a git reset then this version of VS Code would have run a git 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 a git reset --hard will not delete this file, but the VS Code button did exactly that because it ran a git clean.



  • discarding changes does not discard uncommitted new files. The VS Code button did a git clean which is completely unexpected. Git even refers to a git clean with completely different terminology.

    git reset -> “Resets the index and working tree. Any changes to tracked files in the working tree since are discarded.

    git clean -> “Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.”. This command also requires you to specify a force option to actually do something, else it quits with an error.

    Note that git clean never once refers to discarding anything, and git reset never refers to removing untracked files. VS Code was doing an idiotic thing. Running git reset --hard AND git clean. There is absolutely no reason to be running git clean from an UI button ever. If you want to remove a file you can explicitly remove it.

    Imagine that the button said “Discard all changes” and then it ran rm -rf --no-preserve-root /*. Would that make sense as a button? No. It definitely would not.














  • Being exposed to a product that exists is not an ad. An ad is explicitly something that a company has paid to make visible to people. If a company isn’t paying for it then it’s not an ad, no matter how much it sounds like one.

    And yes, going to a store and trying shit out is exactly how it should go. Reading reviews and talking to others is exactly how it should go. Companies paying to manipulate people of the world using psychology is what ads are. Not seeing a product being used in the wild.

    a paid notice that is published or broadcast (as to attract customers or to provide information of public interest)