Live data from Hacker News

A Git client for simultaneous branches on top of your existing workflow

gitbutler.com

41–50 of 119 posts

Re: A Git client for simultaneous branches on top of your existing workflow

#41
post #14

Earlier quoted context omitted.

It's a good question, I was just working on a blog post - both because worktrees are very cool and also because I think we have a nice alternative to a similar issue. With worktrees you can have different branches in different working directories and work on them at the same time. But practically, there is very little difference to just cloning the repo twice and working on different branches in the two checkouts. Th…

Reminded me of a product called Rational ClearCase: > It uses the MultiVersion File System (MVFS) which is a virtual file system that displays specific versions of data stored. In particular, it supports dynamic views which can show an arbitrary combination of local and remote files https://en.m.wikipedia.org/wiki/Rational_ClearCase

Yeah, this sounds very much like a 'view' in clearcase.

It's a good feature especially with big monorepos where it is helpful to pick and choose a known good version of specific module or subset of files without polluting the history.

Tracking good versions of every single file with huge number of files changing was a pain though.

Re: A Git client for simultaneous branches on top of your existing workflow

#42
Very cool, congrats Scott!

I have been getting very into jj over the last few weeks, which is larger in scope, but also currently uses git as a backend of sorts and supports similar workflows. Do you have any thoughts/opinions/comparisons to it?

EDIT: I just mentioned this in the jj Discord and schacon is already in there, I didn't realize!

Re: A Git client for simultaneous branches on top of your existing workflow

#45
post #30

Earlier quoted context omitted.

Im not following you. What do you mean by “don’t use other tooling”?

GitButler will literally not work when you use raw git, or other tools.

It works fine. The only thing that is a problem is “branch” and “commit”, things that use the index. But that makes sense. If you have setup two virtual branches and then from the cli run “git commit”, which branch do we commit to?

Re: A Git client for simultaneous branches on top of your existing workflow

#46
post #30

Earlier quoted context omitted.

Im not following you. What do you mean by “don’t use other tooling”?

GitButler will literally not work when you use raw git, or other tools.

But even if you do run “checkout” or “commit”, we still notice that you did that and try to put you in the state you want.

Re: A Git client for simultaneous branches on top of your existing workflow

#47

Not sure this is something I need. One thing I do need though, maybe someone knows a solution: Often I find myself maintaining a handful of "local" changes. I make some changes that only make sense in my local environment, that I don't want to push. What I end up doing is maintaining these changes as a commit, committing on top of them, and using `git rebase -i` to periodically move them up. Then before I push, I hav…

I also have this issue. What I do is work in a separate branch and cherry pick commits over to main then rebase.

I bet that what you describe could be implemented with stashes and scripts run on hooks, but that feels like fighting the tool too much. There's probably something we're missing?

Re: A Git client for simultaneous branches on top of your existing workflow

#48
post #38
post #30

Earlier quoted context omitted.

Im not following you. What do you mean by “don’t use other tooling”?

> Quick warning. You cannot use both GitButler virtual branches and normal Git branching commands at the same time, you will have to "commit" to one approach or the other. & see the description of 'the integration commit' for some detail of how they make it work: https://docs.gitbutler.com/features/virtual-branches/integra... Basically anything you do with `git` (or another GUI) will get blown away by GitButler; or i…

You can switch back and forth rather easily. But if you have multiple branches applied, some git commands wont make any sense.

Re: A Git client for simultaneous branches on top of your existing workflow

#49

Not sure this is something I need. One thing I do need though, maybe someone knows a solution: Often I find myself maintaining a handful of "local" changes. I make some changes that only make sense in my local environment, that I don't want to push. What I end up doing is maintaining these changes as a commit, committing on top of them, and using `git rebase -i` to periodically move them up. Then before I push, I hav…

I do this all the time in almost any repo I work in. I usually just keep the difference as “junk” in my local work tree.

I never git commit -a anyway, my commits are always kinda prepared and meticulous.

I just live with the spurious diff and extra stashing. All alternatives seem to complicated. I do love the way Jetbrains IDEs manage changesets though. It is a big improvement over only (not) using git for this, but I rarely use their IDEs nowadays.

Re: A Git client for simultaneous branches on top of your existing workflow

#50

Not sure this is something I need. One thing I do need though, maybe someone knows a solution: Often I find myself maintaining a handful of "local" changes. I make some changes that only make sense in my local environment, that I don't want to push. What I end up doing is maintaining these changes as a commit, committing on top of them, and using `git rebase -i` to periodically move them up. Then before I push, I hav…

I think those local changes should be treated as config that can be overriden in the local environment through a combination of files that are listed on .gitignore and environment variables.
Post reply on HN