What Git clients do you use?
from Faalangst_26@feddit.nl to programming@programming.dev on 07 Aug 16:41
https://feddit.nl/post/39883639

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!

#programming

threaded - newest

cbazero@programming.dev on 07 Aug 16:45 next collapse

The cli because it is consistent everywhere and has all fearures

pinball_wizard@lemmy.zip on 07 Aug 16:51 next collapse

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 VDCodium.

killingspark@feddit.org on 07 Aug 17:06 next collapse

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

The2b@lemmy.vg on 07 Aug 17:15 next collapse

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 on 07 Aug 18:11 next collapse

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 on 07 Aug 18:26 collapse

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.

doeknius_gloek@discuss.tchncs.de on 07 Aug 17:42 next collapse

Uhhh, git add -p?

staircase@programming.dev on 07 Aug 19:38 collapse

the best git command

catalyst@lemmy.world on 07 Aug 19:42 collapse

Hard agree haha, use this one constantly.

HaraldvonBlauzahn@feddit.org on 07 Aug 18:15 collapse

git gui is nice for this.

(or jj split).

AdamBomb@lemmy.sdf.org on 07 Aug 22:28 next collapse

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.

0ops@piefed.zip on 08 Aug 00:08 collapse

Jah, mein fearures

slacktoid@lemmy.ml on 07 Aug 16:53 next collapse

Lazygit.

lobut@lemmy.ca on 07 Aug 20:25 next collapse

It’s what I use when I need a bit of a UI for some things. I use the terminal mostly but Lazygit is great.

slacktoid@lemmy.ml on 07 Aug 21:29 collapse

It just works really well. I don’t mind the terminal commands but lazygit makes using git just so much nicer

SinTan1729@programming.dev on 07 Aug 21:53 collapse

I mostly use git from the cli, but when I want to use a frontend, I use lazygit. (I just find it easier to use TUI for some things like only committing some of the changed files, squashing, or fixup commits.)

slacktoid@lemmy.ml on 07 Aug 23:57 collapse

It works great from neovim so I’ve been using it a lot more since.

Kissaki@programming.dev on 07 Aug 16:55 next collapse

TortoiseGit.

Through settings, I move the Show Log to the top context menu level, and it’s my entry point to every Git operation.

I see a history tree to see and immediately understand commit and branch relationships and states. I can commit, show changes, diff, rebase interactive or not, push, fetch, switch, create branches and tags, squash and split commits, commit chunk-wise through “restet after commit”, … And everything from a repo overview.

/edit: To add; other clients I tried never reached what I want from a UI/GUI, never reached TortoiseGit. Including IDE integrations where I’m already in the IDE; I prefer the separate better TortoiseGit.

GitButler is interesting for it’s different approach, but when I tried it out the git auth didn’t remember my key password. (Since trying out jj I found out it may have been due to disabled OpenSSH Service.)

Billy2600@lemmy.world on 07 Aug 19:36 collapse

Seconded. I’m a .Net developer on Windows, I like the Explorer integration.

kewjo@lemmy.world on 07 Aug 17:04 next collapse

cli and meld for mergetool

HaraldvonBlauzahn@feddit.org on 07 Aug 18:17 collapse

Yeah, meld is nice.

zarlin@lemmy.dbzer0.com on 07 Aug 17:07 next collapse

Fork on windows, SourceGit on Linux, both have a similar UI layout to SourceTree, but are much faster/snappier.

I really like having a clear overview of the commit history, branches and current local state. I haven’t figured out yet how to get such an “at a glance” overview in the CLI.

For advanced stuff the CLI is still very convenient.

Faalangst_26@feddit.nl on 07 Aug 18:05 next collapse

Have to take a look at Fork (annoying name to Google I image). Sourcetree can be quite sluggish and downright annoying on macOS.

Ditto on the CLI having its pro’s and cons

Awkwardparticle@programming.dev on 07 Aug 21:28 collapse

Fork is the best as far as GUI goes, but you can’t use a search engine to find any support information.

mesamunefire@piefed.social on 07 Aug 20:47 collapse

I second sourcegit. When I need to I'll drop into the clu. But it's so much easier to just look at the branches in sourcegit.

It's like an open source gitkracken.

fulg@lemmy.world on 07 Aug 17:17 next collapse

For professional use I’ve heard good things about SmartGit, unfortunately my work refused to buy me a license and the trial period wasn’t long enough for me to really form an opinion.

Work suggests to use SourceTree but it is way too sluggish.

These days I use git CLI for most things, and VSCode to review changes and submit PRs. Of course this also assumes you use a decent shell with git support, like Oh-My-Posh or similar, so it is always clear what you are working on.

catalyst@lemmy.world on 07 Aug 17:18 next collapse

CLI for me. I do use the GitLens plugin in vs code but only so I can see commit info inline. I never commit anything from vs code.

I like Kaleidoscope (v3) for diffs but not for merging. I could probably use any graphical difftool for this purpose but it’s what I’m used to.

ruffsl@programming.dev on 07 Aug 18:11 collapse

FYI, VSCode can now natively show commit info inline, no GitLens extension required:

code.visualstudio.com/docs/…/tips-and-tricks#_git…

catalyst@lemmy.world on 07 Aug 19:41 collapse

Aah good to know, thanks! 🙏

AMillionMonkeys@lemmy.world on 07 Aug 17:20 next collapse

I use GitHub Desktop on Mac and PC. It works fine with local repos, too.

astrsk@fedia.io on 07 Aug 17:30 next collapse

CLI, nvimdiff 90% of the time. If I’m on a windows workstation, I might end up using git extensions GUI as it helps me visualize what’s happening a little better sometimes.

setsubyou@lemmy.world on 07 Aug 17:31 next collapse

I mostly use the cli, but also Sublime Merge. It makes some things really convenient (like committing only some lines in a changed file), and looking at diffs is snappy too.

tribut@infosec.pub on 07 Aug 17:37 collapse

Just fyi, you can add only a few lines of a changed file on the cli too using git add -p

omgitsaheadcrab@sh.itjust.works on 07 Aug 17:34 next collapse

Mostly Magit, some CLI

TheAgeOfSuperboredom@lemmy.ca on 07 Aug 17:37 collapse

Magit is fantastic!!

h4x0r@lemmy.dbzer0.com on 07 Aug 17:42 next collapse

I use plain old git for the same reasons already mentioned, but magit is the gold standard.

Anafabula@discuss.tchncs.de on 07 Aug 17:43 next collapse

lazygit & gitsigns.nvim

Do Jujutsu & jjui count? The backend is still git.

roadrunner_ex@lemmy.ca on 07 Aug 17:46 next collapse

I’m a big fan of tig for visualizing the graph and looking over history (then I don’t need to leave the terminal, and it’s snappier, in my experience, than most full-GUI programs like Sourcetree), but for actual Git commands, I like the CLI

ruffsl@programming.dev on 07 Aug 17:57 next collapse

Mainly the official git CLI for controlling branches and sub modules, and sometimes the GitHub CLI if quickly checking out a pull request from a forked repo.

Also use the source control tab in VSCode rather often, as it’s really convenient to review and stage individual line changes from its diff view, and writing commit messages with a spell check extension.

If it’s a big diff or merge conflict, I’ll break out the big guns like Meld, which has better visualizations for comparing file trees and directories.

About a decade ago, I used to use SmartGit, then tried GitKraken when that came around, but never really use much of the bells and whistles and wasn’t keen on subscription pricing. Especially as the UX for GitHub and other code hosting platforms online have matured.

Starfighter@discuss.tchncs.de on 07 Aug 18:05 next collapse

gitui and the plain old git cli

Deebster@infosec.pub on 07 Aug 19:43 collapse

This is very satisfying to use and is a nice companion to the command line - I particularly use it to stage only certain lines and files from the changes.

I tried lazygit first, but there was a consistent lag that was probably only ¼ second but it ruined the experience for me.

HaraldvonBlauzahn@feddit.org on 07 Aug 18:13 next collapse

I used a lot of Magit at work (it’s good), as well as jujutsu and command line. Also, gitk for browsing history.

Currently I use jujutsu at home for leisure stuff and command line + git gui at work. For some workplaces, more powerful tools are just overkill.

tunetardis@piefed.ca on 07 Aug 18:17 next collapse

I use Sourcetree for routine stuff, though I occasionally have to hit the command line when shit gets real.

HaraldvonBlauzahn@feddit.org on 07 Aug 18:19 next collapse

More options:

git-scm.com/downloads/guis

hallettj@leminal.space on 07 Aug 18:44 next collapse

Fugitive, the vim / neovim plugin. It does everything the CLI does, but uses vim interfaces very effectively to enhance the experience. For example it’s quite good for selectively staging changes from a file. I also like the option to open a buffer with the version of a file from any specified commit.

I also tried neogit which aims to port magit to neovim. I didn’t like it as much. Partly because as far as I could tell at the time it lacked features compared to fugitive. But also because it seemed to want me to do everything through UIs in its own custom windows. Fugitive is integrated more thoroughly into vim via command mode, and special buffers.

jjjalljs@ttrpg.network on 07 Aug 18:53 next collapse

Whatever’s built into pycharm or vscode for looking at diffs. Command line for push pull squash etc

leftzero@lemmy.dbzer0.com on 07 Aug 19:04 next collapse

Git Extensions.

It’s what they used at my job when I started, it does the job, and I’ve gotten used to it. 🤷‍♂️

nekusoul@lemmy.nekusoul.de on 07 Aug 21:52 collapse

I personally prefer lazygit nowadays, but when it comes to GUI clients on Windows then Git Extensions is definitely a very good pick.

I particularly like that it doesn’t hide that it’s just executing git commands under the hood and its focus on the history graph. Those two things really helped understand how git actually works and why I’m still recommending it.

leftzero@lemmy.dbzer0.com on 07 Aug 22:30 collapse

Yeah, maybe it’s because I learned git from the graph, but I find it really helpful when figuring out why a certain piece of code ended up looking like it does (the ability to see the changes made in every commit and open versions of the files at any point in history without checking out the commit is also very useful).

And yeah, if you need or want the command line it always lets you open a git prompt for you to do whatever you want, which is nice.

Also, again maybe because it’s what I’ve gotten used to, but I find the way it handles merge or rebase conflicts more useable (or rather less unusable) than any other I’ve tried…

Quibblekrust@thelemmy.club on 07 Aug 19:29 next collapse

Vscode with the Git Graph extension.

ALERT@sh.itjust.works on 07 Aug 20:08 next collapse

sourcegit, fork

Mad_Punda@feddit.org on 07 Aug 20:12 next collapse

CLI, gitui, SmartGit, various editor integrations when I’m there anyway (VS code, JetBrains)

The CLI is great because it works everywhere, but it’s not the best to review changes before I commit, or to inspect the log, plan merges etc. So I tend to go for more graphical tools for these tasks. Used SmartGit a lot at work. But recently learned about gitui and like its simplicity at times esp when I’m at the command line anyway.

The editor integrations I only really use to commit small changes or switch branches, see if I have changes etc.

somegeek@programming.dev on 07 Aug 20:48 next collapse

Lazygit. Used gitui for a long while but lazygit has vim key bindings which is much nicer and it also seems much more stable.

BeigeAgenda@lemmy.ca on 07 Aug 20:53 next collapse

I mostly use git from the console.

  • git with a bunch of aliases for common operations and making the log pretty.
  • gitk when I need a UI to browse the history
  • kdiff3 as mergetool
anas@lemmy.world on 07 Aug 21:01 next collapse

Mostly vscode, and GitHub desktop for projects that I don’t use vscode for. I want to learn how to use the CLI, I just didn’t get around to it yet.

whotookkarl@lemmy.dbzer0.com on 07 Aug 21:50 next collapse

CLI with some aliases for viewing commit history and branching, or less frequently an IDE plugin

cupcakezealot@piefed.blahaj.zone on 07 Aug 21:58 next collapse

i loved fork on windows but i'm too lazy to set up wine to try and get it to work now i just use git cola and the cli.

zarlin@lemmy.dbzer0.com on 07 Aug 22:10 collapse

I use SourceGit as a Fork alternative on Linux, it’s pretty similar

bananabread@lemmy.zip on 07 Aug 22:46 next collapse

GitKraken ❤️

If not present, vscode + gitlens

bignose@programming.dev on 07 Aug 22:50 next collapse

Magit is what allowed me to finally commit to switching to Git full time.

It’s such an excellent front-end for Git that I’ve known numerous workmates learn Emacs just to use Magit.

spartanatreyu@programming.dev on 08 Aug 00:32 next collapse

Fork !!!

It’s hands down the best git client.

It’s free as in: sublime text or winzip where they ask you once a month if you want to pay for it but you can just select: I’m still trying it out, and it gets out of your way.

  • It’s got a well designed tree graph like in GitKraken except it doesn’t lag
  • It’s interactive rebasing is as smooth as JJ / LazyGit, so you can edit/rename/reorder your commits except you don’t have to have to remember CLI flags since it has its own UI
  • It’s lets you commit individual lines by selecting them instead of adding/removing whole hunks like Sourcetree except it isn’t filled with paper cuts where a feature breaks in an annoying way for 2 years and you have to do extra steps to keep using it how you want.

And one killer feature that I haven’t seen any other git clients handle: allowing me to stage only one side of the diff. As in: if I change a line (so it shows up as one removed line and one new line in git), I can decide to add the new line change while still keeping the old line.

So changing this:

doThing(1);

into this:

doThing(2);

Shows up in git as:

- doThing(1);
+ doThing(2);

But if I still want to keep doThing(1);, I don’t have to go back into my code to retype doThing(1);, or do any manual copy-pasting. I can just highlight and add only doThing(2); to the staging area and discard the change to doThing(1);.

So now the code exists as:

doThing(1);
doThing(2);

Now with a one-liner example like this, we could always re-enter the code again. But for larger code changes? It’s far easier to just highlight the code in the diff and say: yes to this and no to the other stuff.

And when you get used to it, it makes it really easy to split what would be large git commits into smaller related changes keeping your git history clean and easy to understand.

fox2263@lemmy.world on 08 Aug 08:27 next collapse

I’ll second Fork, it’s been my go to for years! Maybe I’ll pay for it one day

ILikeTraaaains@lemmy.world on 08 Aug 09:05 collapse

I love Fork, bought the license to support the developer.

The only thing I don’t like is that there is no Linux version, asked the dev and he told me that the issue with Linux is that there are different distros with different GUI libraries so it would require multiple versions for Linux.

A bit saddened it I completely understand.

lightnsfw@reddthat.com on 08 Aug 01:40 next collapse

Is Vscode a git client?

No one take from me though idk what I’m doing when it comes to programming stuff.

Cratermaker@discuss.tchncs.de on 08 Aug 07:10 next collapse

I made some automation in python for common git tasks and use the cli otherwise. I tried a couple like sourcetree and the built in automation for VS but they’re either slow or lack features i’d like.

Tenkard@lemmy.ml on 08 Aug 08:38 next collapse

Github desktop, despite the name it’s just a git client. Absolutely clownish that there’s no official Linux support (there’s a fork which works perfectly). I use it to interact with self-hosted gitea, codeberg and github, pretty happy with it, I’m Aldo testing git butler

PlexSheep@infosec.pub on 08 Aug 09:20 collapse

Lazy git most of the time, sourcegit for heavy duty stuff.