this post was submitted on 07 Aug 2025
87 points (98.9% liked)

Programming

22107 readers
292 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

I'm wondering if you use any (graphical) clients to manage your Git, and if so, what client you use.

I myself have to use git professionally across all 3 major OS-es, and I currently use Sourcetree on Windows and macOS, and the Git tools built-in into IntelliJ on Linux.

Have given MaGit a try, but just couldn't get all the shortcuts to stick in my mind.

Interested to hear your experiences!

you are viewing a single comment's thread
view the rest of the comments
[–] cbazero@programming.dev 118 points 4 days ago (4 children)

The cli because it is consistent everywhere and has all fearures

[–] killingspark@feddit.org 23 points 4 days ago* (last edited 4 days ago) (3 children)

The only thing I'm missing in the CLI is easy picking and choosing which change to include in a commit on a more fine grained basis than files. I sometimes have a changed file and the changes fix different issues and thus should get separate commits but with the CLI I can't easily select the changes to be staged. At least not AFAIK.

Edit: Richards law of posting something wrong to get fast correct answers seems to stay true, even on lemmy. Thanks for teaching me something today <3

[–] doeknius_gloek@discuss.tchncs.de 50 points 4 days ago (1 children)
[–] staircase@programming.dev 12 points 4 days ago (1 children)
[–] catalyst@lemmy.world 4 points 4 days ago

Hard agree haha, use this one constantly.

[–] The2b@lemmy.vg 6 points 4 days ago* (last edited 4 days ago) (2 children)

You can via git add -i foo.bar

I believe the only issue with that is that it can only go by hunks. If your changes are sufficiently far away, you can select them separately. But if you change one function that should be in patch a, and another function 5 lines down that should be in patch b, I think you're screwed

That being said, this is all from memory, so don't quote me on it

[–] Corngood@lemmy.ml 8 points 4 days ago

In interactive add mode you can use s to split a hunk, and e to edit it. That's usually enough for me to split things up.

[–] hallettj@leminal.space 6 points 4 days ago

I usually use git add -p to selectively stage hunks. But in git add -i I think running the patch command does the same thing to get into patch mode.

If patch mode shows you a hunk, and you only want some of the lines you can press s to split into smaller hunks. Then you'll be prompted whether to add each smaller hunk separately.

If you want to stage a change that is on the same line as a change you don't want to stage, or on an adjacent line, then you need to use e to edit the hunk. Git stages whatever changes are left when you're done editing. The file in the working tree on disk is unchanged.

[–] HaraldvonBlauzahn@feddit.org 2 points 4 days ago* (last edited 4 days ago)

git gui is nice for this.

(or jj split).

[–] AdamBomb@lemmy.sdf.org 8 points 4 days ago

Same, because its UX is actually really good. Years ago when I was new to git, I tried to use Sourcetree to revert a merge commit, and it would just fail. When I tried it in the CLI, it still failed, but it told me how to fix it. (I needed to specify which parent)

That, plus it’s scriptable, plus I’m in the terminal a lot anyway. I’ll also use the IDE git client sometimes if that’s where I am at the moment.

[–] pinball_wizard@lemmy.zip 6 points 4 days ago* (last edited 4 days ago)

CLI first here too, for the same reason.

I'm not above using an editor plugin if it's simple and reliable and right there waiting, like VSCodium.

[–] 0ops@piefed.zip 0 points 4 days ago

Jah, mein fearures