5 ms·
I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workfl
by crispyambulance 6mo ago
I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage.
At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice.
That said, the OP's commands are useful, I am copying them (because obviously I won't ever memorize them).
- weedhopper 6mo agoI’ve recently been looking into some tools that provide quick or painless help like pop up snippets with descriptions and cheat sheets, got any recommendations?
- rusted_gear 6mo agoI've found tldr to be useful https://github.com/tldr-pages/tldr https://github.com/tldr-pages/tldr
- arcanemachiner 6mo agoNavi is good for generating personal cheatsheets: https://github.com/denisidoro/navi https://github.com/denisidoro/navi But for Git, I can't recommend lazygit enough. It's an incredible piece of software: https://github.com/jesseduffield/lazygit https://github.com/jesseduffield/lazygit
- alwillis 6mo agoCheaters: https://brettterpstra.com/projects/cheaters https://brettterpstra.com/projects/cheaters
- FergusArgyll 6mo agoJust handroll one, I wrote one in python, use an sqlite db, call out to fzf and voila you have the perfect tool. Codex can prob one shot it
- freedomben 6mo ago> I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage. I wrote a cheat sheet in my notes of common commands, until they stuck in my head and I haven't needed it now for a decade or more. I also lean heavily on aliases and "self-documenting" things in my .bashrc file. Curious how others handle it. A search every time I need to do something would be too much friction for me to stand.
- dheera 6mo agoI just use Claude Code as a terminal for git these days. It writes up better commit messages than I would write anyway. No more "git commit -m fix"
- freedomben 6mo agoindeed, I held off for a while but finally caved because I got sick of seeing commits with `git commit -m .` littered in there. These are personal projects so I'm the only one dev-ing on them, but still so nice to have commit messages.
- selcuka 6mo agoThat could work if Claude Code made the code changes, but if you made them and only asked Claude to commit them, how does it know "why" you made those changes? Does it have access to your bug tracking system, for example?
- awesome_dude 6mo agoIf Claude was used in the creation of the change, there's usually some dialogue for Claude to use. FWIW i use Claude to help with code changes, then give the diff to Gemini to review/ create meaningful commit messages
- dheera 6mo ago> but if you made them and only asked Claude to commit them, how does it know "why" you made those changes? It's an LLM. It can diff and figure out why I did what I did, in most cases > Does it have access to your bug tracking system, for example? You can give it access and tell it to look there
- alwillis 6mo ago> At this point perhaps a million person-years have been sacrificed to the semantically incoherent shit UX of git. I have loathed git from the beginning but there's effectively no other choice. Yes! We mostly wouldn’t tolerate the complexity and the terrible UX of a tool we use everyday--but there's enough Stockholm Syndrome out there where most of us are willing to tolerate it.
- TeMPOraL 6mo agoUnless you're aware that such powerful commands are something you need once in a blue moon, and then you're grateful that the tool is flexible enough to allow them in the first place. Git may be sharp and unwieldy, but it's also one of the decreasing amount of tools we still use - the trend of turning tools into toys consumed the regular user market and is eating into tech software as well.
- crispyambulance 6mo agoTools, done right, are a joy to use and allow you to be expressive and precise while also saving you labor. Good tools promote mastery and creative inquiry. Git is NOT that. Git is something you use to get stuff done, until it becomes an irritating obstacle course of incidental complexity.
- irishcoffee 6mo agoHg is a joy to use compared to git. Sure wish hg had won.
- alwillis 6mo ago> Sure wish hg had won. To me, it's more like GitHub won; Git came along for the ride. Back in the day when companies evaluated Git and Mercurial (Facebook, Google, Microsoft), they decided Mercurial was better. Mozilla used Mercurial for a long time until switching to Git fairly recently. But once GitHub took off and became the center of gravity for developers, it became the de facto standard. It also explains why there have been several attempts (Sapling, JJ) to use Mercurial's semantics as a front-end for Git.
- dec0dedab0de 6mo agoI just use my ide integrations for git. I absolutely love the way pycharm/jetbrains does it, and I'm starting to be ok with how vscode does. Remembering git commands besides the basics is just pointless. If I need to do something that the gui doesn't handle, I'll look it up and put it in a script.
- awesome_dude 6mo agoThe relevant XKCD comic https://xkcd.com/1597/ https://xkcd.com/1597/ FWIW I too was once a "memorised a few commands and that was it" type of dev, then I read 3 chapters of the Git book https://git-scm.com/book/en/v2 https://git-scm.com/book/en/v2 (well really two, the first chapter was a "these are things you already know") and wow did my life with git change.
- ngruhn 6mo agoI don't even think git cli UX is that bad. Didn't git pioneer this sub-command style? Much better than like e.g. ffmpeg. Sure some aspects are confusing. I still don't understand why `checkout` is both for changing branches and clearing uncommitted changes. But overall I think the tool is amazing. I've not observed a bug in git once.
- jcynix 6mo ago> Didn't git pioneer this sub-command style? No, various other tools used it before git, e.g. openssl.
- ngruhn 6mo agosure but it certainly popularized it
- skydhash 6mo ago> I still don't understand why `checkout` is both for changing branches and clearing uncommitted changes. Because `checkout` is for getting the working directory to the state of a specific revision. Which both means switching branches (which are just pointer to revisions) and clearing changes (and get back to the starting revision). In both cases, you "check out" the version of the file at a specific commit or HEAD.
- twohaibei 6mo ago`git change` can switch branches too if thats easier to grasp :)
- kelvinjps 6mo agoThat's why I really like lazygit, I don't need to remember much because all the keymaps are shown in the UI. I like those kinds of Ui like whichkeys in neovim, or helix, or Doom Emacs.
- neonstatic 6mo agoI think this is where LLMs shine. I experience the same difficulty with a lot of command line tools, .e.g find is a mystery to me after all these years. Whatever the syntax is, it just doesn't stick in my memory. Since recently I just tell the model what search I want and it gives me the command.
- shiroiuma 6mo ago>I am convinced that the vast majority of professionals simply don't bother to remember and, ESPECIALLY WITH GIT, just look stuff up every single time the workflow deviates from their daily usage Partly that, but for me at least, I have a bunch of simple bash scripts and aliases for things I do frequently. Git makes this really easy because you can set aliases for lots of custom commands in the .gitconfig file.