Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)UG
Posts
0
Comments
5
Joined
2 yr. ago

  • Fair, git’s documentation can definitely be too terse despite being very extensive and could really benefit from examples and common use cases sections. I only use a fraction of what git offers, but what I do use I use often, which definitely contributes to my happiness with git: I seldomly need to look things up

  • It is simply not my experience that cleaning up commits after committing early is difficult in git. Amending a commit is a single -a flag away from the git commit command. The opposite problem is when you do too much work and want to split it into multiple commit rather than a huge one, in which case git add -p is again a single flag away from git add.

    In general, git’s entire model is to allow you to work first, and do administrative tasks (including tidying up your commit history etc) later.

    And almost nothing is truly destructive in git, the vast majority of cases can be fixed by judicious use of git reflog.

    The only cases I’ve ran into where git repos became corrupted were caused by external tools, mainly GUIs that label buttons with git commands that do something different when clicked (like the button labeled push actually doing git push —all for no good reason, and such things) with users that have no idea how git works that have been trained just by telling them “click this to save your work, click this to get the last version of the code”

  • That’s not really how one would use worktrees in git. Worktrees are useful in the case when e.g. you are working on version 0.15 of your software that has many breaking changes to version 0.14 (perhaps even on a build system level) and you need to release a 0.14.1 patch. Worktrees separate directories which means you don’t need to stash or do a wip commit, nor clear you 0.15 build artefacts. Just cd to a different worktree, checkout the 0.14 branch, create and checkout the 0.14.1 branch, clear build artifacts in a different directory from your main development one, and start working.

    When done, just cd back and keep working again without switching branches, clearing artifacts, or doing full rebuilds of the in-development 0.15 version.

    Plus, git does not store change sets or branches or anything on any remote unless you push them either, so if you’re having that problem just stop pushing things you don’t want to push. You can totally rsync a git repo, just ensure it’s at rest. Otherwise do what you should be doing anyway: set the repo on another machine as a remote of the other repo, so you can git pull my_private_machine feature/my_private_branch without needing to push to a central repo.

    I’m sure jujutsu has many advantages, but it also reads to me like you’re misunderstanding the git model. Which can be a fair critique of git to be fair, but then we would need to talk about what about the git model people have trouble with, why, and how to address those issues, and so far I haven’t seen any kind of research in that direction from jujutsu (not that I’ve been looking particularly hard)