TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JJ Cheat Sheet

186 点作者 justinpombrio3 个月前

16 条评论

sundarurfriend3 个月前
The biggest blocker for me to switch to using jj currently is <a href="https:&#x2F;&#x2F;github.com&#x2F;jj-vcs&#x2F;jj&#x2F;issues&#x2F;3949">https:&#x2F;&#x2F;github.com&#x2F;jj-vcs&#x2F;jj&#x2F;issues&#x2F;3949</a> which is that it doesn&#x27;t have a `core.fileMode` option equivalent. What this means in practice is that it&#x27;s unusable from WSL when your repo is on an NTFS filesystem. It gets confused by NTFS&#x27;s lack of executable permission bit and makes spurious changes&#x2F;commits.<p>It&#x27;s a small thing, but while jj adds some convenience, it doesn&#x27;t add enough (for me) to offset the inconvenience of changing my workflow to not use WSL. (Another relatively minor inconvenience is its inability to use your SSH configs. So if you have multiple key pairs and need to use specific ones that aren&#x27;t jj&#x27;s default pick, an ssh-agent is the only way.)<p>That said, I would 100% recommend jj over git for any new programmer who hasn&#x27;t yet had to contort their brain already into the git ways. All the things that git&#x27;s UI does a great job of obscuring and presenting in a confusing way, jj presents in a straightforward way that makes sense and is easy to remember.
评论 #43021407 未加载
评论 #43021948 未加载
评论 #43023759 未加载
评论 #43022028 未加载
评论 #43023783 未加载
rtpg3 个月前
Workflow-wise I was struggling a bit to figure out how to work with the bookmarks in jj not moving along.<p>I now have a bit of a new strategy:<p>- When starting up a branch, right up the &quot;final commit message&quot;, along with a bunch of notes on what I think I need and other TODOs<p>- While working, when I want to checkpoint some work, I use jj split to chop up some chunk of work, describe it, and then edit up my TODOs<p>this way the tip of my branch is always this WIP commit describing my end goal, I can find it, and I can add a bookmark to it.<p>Instead of git &quot;I add changes over time and make my commit graph move forward&quot;, it&#x27;s &quot;I have a final commit node and add commits _behind it_&quot;. Been working well enough.
评论 #43021096 未加载
评论 #43021205 未加载
评论 #43021109 未加载
nchmy3 个月前
Thanks for this! Just yesterday I decided to finally start really using jj with real work, whereas I had only fiddled around with it a few times while following tutorials over the past year.<p>One suggestion - reverse the direction of the arrows: q-&gt;r rather than q&lt;-r
评论 #43021509 未加载
评论 #43022049 未加载
infogulch3 个月前
Is there a short description of how jj works specifically from the perspective of a seasoned git user? I more or less understand git -- how to use it as well as its building blocks -- so the caveats and generalizations and glossing-over that are appropriate for a more general audience seem to get in the way of my understanding what&#x27;s going on underneath.
评论 #43021631 未加载
评论 #43021576 未加载
gjm113 个月前
I think I&#x27;m confused by the box about &quot;jj abandon&quot;, which (unlike all the other boxes) talks about &quot;edits&quot; rather than &quot;files&quot; -- which must be a deliberate choice because the legend at the bottom lists &quot;edits&quot; and &quot;files&quot; separately.<p>Shouldn&#x27;t &quot;edits&quot; be attached to the <i>arrows</i> rather than the <i>nodes</i> in the graphs? So not r [edit3] --&gt; q [edit2] --&gt; p [edit1] but r --[edit3]--&gt; q --[edit2]--&gt; p --[edit1]--&gt; o, where o is p&#x27;s predecessor. (I think you could do without &quot;edit1&quot; here.)<p>And then &quot;jj abandon q&quot;, if I&#x27;m understanding it right, turns r --[edit3]--&gt; q --[edit2]--&gt; p into r --[edit3]--&gt; p.<p>(I am not certain I&#x27;ve understood the official docs for &quot;jj abandon&quot; correctly, so it&#x27;s very possible that I&#x27;m wrong about what it does, in which case obviously the above is wrong. But whatever it does, if you&#x27;re distinguishing &quot;files&quot; from &quot;edits&quot;, surely the &quot;edits&quot; go on the edges rather than the nodes of the revision-graph.)
评论 #43021299 未加载
评论 #43021667 未加载
评论 #43022317 未加载
weinzierl3 个月前
I tried to get into Jujutsu several times and tried to love it, but somehow it seems there is little overlap between the issues I have with git (which there are plenty) and the problems jj tries to solve.<p>My impression is that the main motivation behind jj is that Google realized how difficult and costly it is to train all new hires in their internal tooling but did not want to open-source it completely. So they came up with a thin UI layer, made it workable with git as a backend and published it in the hope it will catch on.
评论 #43023378 未加载
评论 #43028469 未加载
评论 #43024547 未加载
jjfanboy3 个月前
I love jj and you could pry it from my cold dead hands but I can&#x27;t make sense of nearly any of these pictograms. :(
bedros3 个月前
Anyone knows of vs code editor extension that works with .jj dir
评论 #43023017 未加载
conradludgate3 个月前
I still don&#x27;t understand the way jj handles conflicts. If I rebase and then fix a conflict later, are those conflict markers going to appear in some of the commits on github when I push?<p>Maybe I&#x27;m in the minority, but I like fixing conflicts as I go. What am I missing?
评论 #43022976 未加载
tripple63 个月前
I&#x27;ve seen several posts on jj, but could anyone please tell what can&#x27;t be done by git, or what is harder in git but super-easy in jj by providing the sequence of git commands and jj commands for comparison?
评论 #43025825 未加载
评论 #43023106 未加载
globular-toast3 个月前
So jj calls commits &quot;changes&quot;, and this is <i>less</i> confusing? Interesting. I find when you dig into people&#x27;s understanding of git (or version control in general), a lot of them understand it as storing a sequence of diffs. This small thing breaks their understanding of the whole system. Calling them &quot;changes&quot; seems like it would reinforce this belief. Or is that the idea? Does jj embrace this perhaps more intuitive &quot;sequence of diffs&quot; view, but more successfully hide the &quot;sequence of commits&quot; reality?
评论 #43027127 未加载
geenat3 个月前
Auto-commit of large files and no way to un-bloat your repo is a showstopper for me no matter how good the DX might be.<p>Large file handling needs to be sane in any new VCS, IMHO, as this is a main failing of git (..without the extra legwork of git-lfs).<p>Edit: <a href="https:&#x2F;&#x2F;github.com&#x2F;jj-vcs&#x2F;jj&#x2F;issues&#x2F;80">https:&#x2F;&#x2F;github.com&#x2F;jj-vcs&#x2F;jj&#x2F;issues&#x2F;80</a> Could maybe bring jj up to parity with git here
评论 #43024508 未加载
wyldfire3 个月前
Does jujutsu have anything like &quot;git am&quot;? I&#x27;d like to take a series of patches and jj-ify them so I can play with it. I get that maybe I can&#x27;t expect to cherry pick a commit because it&#x27;s naturally different from git. but if I have a patch it seems like I should be able to apply those as jj changes?
评论 #43022302 未加载
wsycharles0o3 个月前
I’m confused. Isn’t this exactly the same as git commands?
评论 #43020823 未加载
评论 #43022367 未加载
mystickphoenix3 个月前
Something that I&#x27;ve been struggling to wrap my brain around is:<p>1. Can I use jj inside a repo that was already initialized with git? I think the answer is yes, but I haven&#x27;t found a tl;dr for it.<p>2. What does the workflow look like to use jj on an existing git repo that all of your coworkers use git for?
评论 #43039648 未加载
159jonie1583 个月前
ROBLOX BLOX FRUIT