Replies: 3 comments 4 replies
-
Thanks for taking your time to try it and write feedback!
For something quite similar to
I think those are not technically merged in the sense of being ancestors of the
I think the main branch will actually end up being on the left because the first parent of a merge should be drawn first. I suspect the issue is actually that commits from different branches can be interleaved, which often causes unnecessary crossovers in the graph. @spectral54 is actually already working on that, but I filed #242 now to track it :)
Yes,
Probably. See if the revset I shared further up works for you.
There's not really a concept of obsolete commits in jj, but which obsolete commits are you thinking of that you want to see?
Correct, I just haven't wanted that yet :) Feel free to file a feature request for that. Please include your use case.
Yes! Part of the problem is that the branch name is something others see, and, for GitHub, it's what identifies a PR (AFAIK). Perhaps we could add a mode where we push each commit to a remote branch named after the change ID. When pushing to GitHub, that might mean setting the base branch to the previous commit's branch in that case.
There actually isn't even a concept of a current branch yet. Without such a concept, the best we can do is to look at the branches pointing to a particular commit. I suppose we could do that and error out if there are multiple branches pointing to it. Feel free to file a feature request.
I can see that being useful when writing a small change in a single commit, but once you have more than one, you'll almost definitely want to close the commits. By the way
Yes, it applies the changes on the remote since last
Yes, good point. I've filed #243 to track that.
You can actually have
Thanks! |
Beta Was this translation helpful? Give feedback.
-
By the way, one of the main reasons I don't use jj more is that |
Beta Was this translation helpful? Give feedback.
-
Yes, good point.
You mean the path to where they all meet? If there are un-merged release branches, that might be very far back. Maybe something like |
Beta Was this translation helpful? Give feedback.
-
Hi hi, 👋
After recently discovering
jj
and starting to play around with it a bit, I thought I'd write up a quick post with my impressions and some notes, in case it's useful for anyone (maintainers, future newbies, etc.)[1].A little background, to give some context for this: Used to be a Googler, where I really enjoyed using Fig. When I went back to using Git more I tried to replicate the Fig experience in Git, with varying degrees of success. The main things I'm looking for are a "branchless" workflow and a good log (suitable for a monorepo). I discovered arxanas/git-branchless a little while ago, and it's really cool, but unfortunately it still requires quite a bit of fiddling with branches (in order to push to GitHub and open PRs). So when I saw a Reddit post by one of the Fig maintainers about a new VCS, I just had to try it out! 😁
So after using it for a whole day(!), here are some thoughts and questions that I have (for myself, mostly), in no particular order:
smartlog
I tried replicating Fig's/git-branchless's smartlog. When executing the log, I want to see all of my active branches[2], including the commit they branched off of, and the current
main
commit. So after fiddling around for a bit, I arrived at:This seems to more-or-less do what I want, with a few minor issues:
main
still show up in the graph. Maybe it just needs a~:main
to filter them out? (In Fig these just disappeared once yousync
ed)main
isn't "prioritized" - I couldn't figure out how to make themain
commit and the different "branch bases" to show up as the left-most column in the graph, with other branches branching out of that. This makes the graph a bit messy and hard to read once I have more than 2-3 branches.hg xl
would be? (i.e., showing obsolete commits as well)"Branchless" workflow
I haven't had the chance to play around with this too much yet, and I am not sure I understand exactly how
jj
thinks of branching and working with remotes, but a few things that "stuck out"...jj git push
seems similar tohg uploadall
(?), except it only pushes branches - I think I understand why this is, but it would be really nice if the explicit branching step could be skipped. Maybejj
could just create synthetic branches for each commit and push those? Also, is there a way to push only "the current branch"? There is the--branch
flag, but it seems to require a branch name. Another thing that might be nice is if there was a flag that allowedjj git push
to close the current commit - having to do close them manually kinda misses out on the advertised "no index, you don't need to commit" thing. 😅I haven't had a chance yet to properly test out the "sync" flow, but here's what I'm interested in for
jj git fetch
:main
? (Pretty sure)Also, is there a way to just list the remotes? Plain
jj git remote
shows the help message, and it only showadd
,remove
andhelp
as sub-commands. 🤔Tooling and integrations
Not surprisingly, since there is no actual
.git
repo anywhere, none of the Git tooling works with ajj
repo - this includes IDEs, shell integrations (status indicators in prompt), GitHub CLI (really useful for creating PRs 😅), etc. I'm sure this will improve with time, but it is a little unfortunate for now.Overall, though, I think I like it. Thanks for doing this, @martinvonz! 👍
[1] Please let me know if this isn't useful, though, and I'll delete the post.
[2] By "my active branches" I mean all commits authored by me, that are on branches that have not been merged to
main
.Beta Was this translation helpful? Give feedback.
All reactions