Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the main reason git is hard is many of the most common commands do too many things. For example, the reset command "reset the current HEAD to a specified state" is too general. I don't think most people consider HEAD as both a working directory and a pointer to the current commit in the repository, instead they just think of it as a pointer to the current commit you are working off of. So they start by just memorizing a couple of commands that do what they need to.

reset -- file #unstage a file reset --hard #reset everything in the working directory

Later they might learn to use reset to undo the last commit.

reset --hard HEAD~1

But they probably still don't really understand what the reset command does. I consider it to be an overloaded command. There should be a command to unstage files, a command to move the HEAD of the current branch (which can keep the --hard and --soft options), and a command to just clear everything from the stage/working directory to start over.

Other commands are similarly overloaded which makes it hard for users to understand unless they learn the internals of git.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: