Hacker News new | past | comments | ask | show | jobs | submit login

I started using this yesterday.

I'm a little unsure how to pull multiple real branches into my workspace.

It'd be nice if I could have a virtual branch overlay a real branch so that I could continue working with both the advantage of GitButler and maintain productivity with colleagues that don't use it.

As it stands right now, I'm a bit unclear on how to operate with others who use the old fashioned branching strategy

I really love to tool though. I watched a talk from Scott yesterday, and he has so many good ideas of where to take Git next.

I also LOVE the "CRDT all the changes" idea, and have tried to implement similar solutions using inotify and a "stack of patches" and BTRFs CoW for space saving, with limited success.

https://news.ycombinator.com/item?id=39356042




The CRDT thing happens in GitButler, but we hid the UI to search and find old changes for now (you can see what it looked like here: https://docs.gitbutler.com/features/timeline). We still record the data locally and could theoretically recreate the state of your working directory and branches at any time. If you're curious, join our Discord and I can show you how we're storing it, you could easily use it in interesting ways until we resurrect a UI for it.


You should be able to do this pretty easily. We list your other local and remote branches in the sidebar. If you apply them, they are essentially converted into virtual branches (remote targets too, I believe)


I think I got it working today. Not sure what I was doing wrong before.

Also, you I recommend that you add the capability to pull different hunks out of the commit, and separate/unsquash them, or even move them to different branches. The UI is begging me to drag parts of the commit out. I can squash commits, but it doesn't seem like I can do the opposite.

Use Case: Just now I made a change to a config file, and a build tool also updated the version in this same config file. I want to split the change out.

Using the CLI to split the commit, I would do this:

  git add -p <file>.              # partial stage
  s                               # for each hunk
For splitting the hunk into a branch, I would do this:

  git checkout -b new-branch-name
  git reset HEAD^                 # if I already staged it
  git add -p
  s                               # for each hunk
Using Magit, splitting out the commit:

  M-x magit-status
  TAB                             # on the file diff
  s                               # per hunk
  e                               # when I need to refine it manually
Using Magit, to move hunks to a different branch:

  M-x magit-status
  TAB                             # on the file diff
  b c                             # new branch
  <same process as before>
  b b                             # as needed, switch branches
Again, want to thank you for you work here. It's really nice, I already am getting my team onboarded to it.


So, yes and no. You should be able to do `reset HEAD^` equivalent by just hitting 'undo', which is essentially what that does. You can then re-commit stuff or drag the newly uncommitted hunks to other branches.

But it's only for the last commit, so something in the middle you can only squash, you can't unfold into two commits or something. Totally doable, but not in our UI yet. (we will do that someday)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: