Replies: 1 comment 1 reply
-
Welcome @dgp1130! In this case, it seems best to continue to use branches. For example, you can pass The main problem is probably that branches are updated when you make a new commit. In those cases, you'll want to detach the branch before you switch to the commit (with e.g. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just started playing around with
git branchless
(loving it so far). I always found the way Git manipulates branches to be very awkward and unintuitive, so I really like the branchless approach here. However, Git generally relies on branches to provide ergonomic names for manipulating commits. If we're going branchless, then I think we need a separate solution which allows short names to refer to specific parts of the graph. Since everything is based around commits, I think naming commits would be the right approach here. This might look like:Since commits are named, we don't need to use hashes to refer to things and the name is retained even when the hash changes. This allows the user to think more in terms of commits and less in terms of branches. Combined with empty commit messages it makes speculative commits much more ergonomic.
git sw
kind of attempts to solve this by making commit messages more easily searchable and works reasonably well combined withgit next
andgit prev
. But all those are restricted togit checkout
. Naming commits is much more flexible since it allows them to be referenced in any other operation (such asgit move
in this case). I think it makes a great primitive to build the rest of the system upon.I only just started with
git branchless
, so maybe there is already a way to do this. I wasn't able to find anything in issues or discussions so I figured I'd suggest it here. I've used a pattern like this before at an internal VCS and really enjoyed it, so I would love to find a way to port that model into Git, andgit branchless
is the closest I've seen to these ideas.Beta Was this translation helpful? Give feedback.
All reactions