3 ms·
https://steveklabnik.github.io/jujutsu-tutorial/hello-world/viewing-contents.html https://steveklabnik.github.io/jujutsu-tutorial/hello-world/... > The very fi
by steveklabnik 2y ago
https://steveklabnik.github.io/jujutsu-tutorial/hello-world/viewing-contents.html https://steveklabnik.github.io/jujutsu-tutorial/hello-world/...
> The very first character at the top left is an @. @ is a special name for "whichever commit the working copy reflects." At first I kind of thought about it like HEAD in git, but that's not correct: HEAD is the most recent commit, but @ represents the working copy, which may be "dirty" from git's point of view. This is our first glimpse into the power of the index-less workflow, though we'll explore that fully in the next chapter. For this moment, just realize that we have one less concept, but haven't actually lost any of its power.
- 38 2y agoOK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes
- jolux 2y agoNo, because `jj git push` only pushes bookmarks. If you `jj git push -c @` or create a bookmark, yeah, you will push the current commit, but then you're asking for that pretty explicitly.
- phildenhoff 2y agoBookmarks in JJ are closer to tags than branches. They aren’t updated whenever you add new commits on top of the bookmark. If you assign your bookmark to the current commit, yes, and I have done that before. But it’s very easy to not do that, and if you push the wrong commit (a WIP commit, let’s say) you can reassign the bookmark and then push again. It’s not a big deal to push arbitrary garbage to the remote if you do, and it’s not common that I do. On the flip side, jj has been remarkably useful at ensuring I never ever, ever lose any of my work. Ever. It’s not an issue that often, but when it is, oh thank god
- sunshowers 2y agoPlease try out Jujutsu.