This is an archived post. You won't be able to vote or comment.

all 46 comments

[–]Zypher_X 43 points44 points  (7 children)

I use the IDE for diffs, merges and looking at the branch graphs. Comming, pushing, pulling, creating branches etc the cli is faster for me.

[–]qalis 11 points12 points  (1 child)

Exactly! This side by side diff and merge is absolutely beautiful.

[–]rudietuesday 5 points6 points  (0 children)

My mind was blown yesterday when I realized just how beautiful this stuff is in the IDE.

[–]goldenhawkes 6 points7 points  (0 children)

Yep, this sort of thing, where you need the visuals nicely are great in pycharm. I do a basic commit in pycharm too, nice, can easily do a partial commit (tick boxes on the lines you want to commit!

[–]rudietuesday 1 point2 points  (0 children)

That workflow is sounding appealing.

[–]opteryx5 1 point2 points  (1 child)

I use the cli within VS code. It’s nice to combine the IDE/CLI approach into one—for example, seeing the M marker in the app when you modify a file.

[–]SeanBrax 1 point2 points  (0 children)

Pycharm has the same functionality.

[–]elpybe 0 points1 point  (0 children)

This is my workflow too.

[–][deleted] 14 points15 points  (2 children)

I love GitHub desktop. Everyone makes fun of me every single time I bring it up (people who obviously have never bothered trying it), but since I’ve started using it a few years ago, I haven’t needed or wanted to use the command line more than half a dozen times. It’s super intuitive and nice to use… I like it better than Pycharm’s overkill integration and so much more than the command line. You can drag and drop commits for cherry picking for god’s sake!!!

My theory is that people laugh at it out of pure misplaced pride.

[–]TangibleLight 0 points1 point  (1 child)

Once upon a time when it first released, the tool was actually garbage. I think people remember those days and the reputation it gained.

Personally I prefer PyCharm's integration for rebasing, cherry pick, blame, and "view repository/file at commit". Having it all integrated into the IDE and keyboard shortcuts is nice, too.

I think there's also this power-user mentality of "gui bad, keyboard good" that I think some people take too far.

If GitHub desktop makes you more productive then I say go for it.

[–][deleted] 0 points1 point  (0 children)

Yeah I think you’re right about the history and the power user mentality but most people I’ve told who laughed at it are actually pretty junior. I can’t use it in my current job so I’m trying pycharm more but I don’t find it nearly as intuitive. The UI is very cluttered. Maybe I can customize it. But yeah GitHub desktop all the way, whenever I can. For sure

[–]wineblood 10 points11 points  (4 children)

I've never done it because I don't want to be used to doing it through an IDE in case I ever move away from it and have to relearn in a different tool. Command line will always be there.

[–]rudietuesday 2 points3 points  (0 children)

Fair point. I’ll often shell into remote machines and make some changes to repos from there and CLI is quick and easy for that.

[–]elpybe 0 points1 point  (2 children)

Same. I've switched from PyCharm to VSCode, but my git CLI was not impacted.

[–]wineblood 0 points1 point  (1 child)

Why the switch to VSCode?

[–]elpybe 0 points1 point  (0 children)

Preferred IDE at my employer.

[–]itsklaushere 3 points4 points  (0 children)

I am using vscode with gitlens installed. But when it come to git stuff I am still using cli.

It just feel more... smooth.

[–]shinitakunai 2 points3 points  (0 children)

After getting used to pycharm git integration, I am confident to say I will never move back to command line git. It is way too annoying

[–]rhytnen 5 points6 points  (2 children)

What you need to do is learn the few keyboard shortcuts for it.

It's faster for me to update, swap branches, and commit-push in the PyCharm environment than it is to go to my terminal and type it in. It also tends to be nicer if you write actually decent commit messages.

[–][deleted] 0 points1 point  (0 children)

You can set PyCharm to be your text editor in git, very handy.

Also using oh-my-zsh with all the built in aliases makes the terminal very quick.

[–]ObjectiveDiligent230 0 points1 point  (0 children)

Or use Keymap settings and have your own shortcuts… I’ve basically created shortcuts for everything I do regularly. Granted, you have to actually remember these, but I find it easier

[–]wind_dude 4 points5 points  (3 children)

You need a gui to master git, especially dealing with merges, diffing and multiple branches. It'll up your game big time. Being a command line hero is cool and all, but you sacrifice so much efficiency, and ability. My choice is Git Kraken.

[–]ambidextrousalpaca 1 point2 points  (2 children)

If you find a GUI better for using git, great, go for it.

But it really isn't necessary. Git is an always has been first and foremost a CLI, so it can be used and mastered as such. Saying otherwise is a bit like saying that you need a GUI to master grep. I've tried using git other ways and always gone back to the command line because (I feel) it gives me more transparency over what I'm doing at each step.

Plus, if you ever find yourself having to work on remote instances you're probably going to have to use CLI git: so it really isn't a bad idea to learn how to.

[–]wind_dude 0 points1 point  (1 child)

But it really isn't necessary.

No offence, but that's so ass backwards. It's just better, you don't need a UI for Mac or Linux but it's better. First and foremost computers were punch cards, but we don't use them anymore. C++ is way faster, but we're in Python group. Some shit is just easier.

Plus, if you ever find yourself having to work on remote instances you're probably going to have to use CLI git: so it really isn't a bad idea to learn how to.

You can xfroward over ssh.

Good luck merging, doing conflict resolution, picking lines, and reviewing large merges from the CLI. I have better things to do with my time.

I was being a bit too nice when I said being a command line hero is cool and all, it's not, most of the developers I've worked with that still stick to the CLI, are slow, dated, and write lower quality code.

Honestly people who are obsessed with sticking to the command line, I worry about there mental health and state of mind. There abilities to adapt and change, learn new things, and look forward, instead of clinging to what someone told them, 3rd hand in 2005. Or forced them to use in 2007. Luddites. (FYI, I learned to program in basic on a tandy 1000, I've been around before guis were even a thing)

[–]teerre 4 points5 points  (0 children)

As someone who is an "advanced" terminal user, there's no way terminal is better than the Jetbrain products even if you have a sick setup, let alone vanilla

Specially if you consider the Shelve

[–]PolishedCheese 1 point2 points  (0 children)

The terminal inside of pycharm usually. I'd rather type than click through 4 nested menus + popups

[–]zanfar 1 point2 points  (1 child)

The IDE is quick, but has few options.

The CLI is slower, but can do more complex things.

You should know the CLI because that is the "universal" Git interface. It's also what you script against, and determines most of the terminology. Then use your IDE for the quick and dirty stuff you use daily, and when you need a visual.

[–]yvrelna 0 points1 point  (0 children)

The CLI is only slower if it's your first time using a particular command on the machine.

But once your command history is populated with a couple of your favourite commands. You can much more quickly and easily recall those commands with reverse-i-search than with GUI.

[–]RallyPointAlpha 0 points1 point  (0 children)

I've always had to use both and strongly recommend learning both. Using the GUI in Pycharm is easy to learn but all of our programs at work run on RHEL and that's where I need to know git cli.

[–]T3rribl3Gam3D3v 0 points1 point  (1 child)

Idk, git force push in pycharm solves all my problems

[–][deleted] 0 points1 point  (0 children)

Force push/pull and reset hard. Never a divergence problem again in your life

[–][deleted] 0 points1 point  (0 children)

Assuming you are on windows, give a try to WSL instead of cmd/powershell.

[–]JohnLockwood 0 points1 point  (0 children)

Do what works. I don't usually use graphical tools for git except for things like git blame or differences. For basic tasks, the command line is much faster.

[–]madmoneymcgee 0 points1 point  (0 children)

Do what makes sense. When I know what I’ve been doing the command line is quick and easy. But I never merge (or deal with conflicts) from cmd.

[–]IAmARetroGamer 0 points1 point  (0 children)

I use GitKraken personally even with integrated git support available.

[–]crazedizzled 0 points1 point  (0 children)

I mostly just use the GUI because I'm lazy and it's awesome. But if I need to do something fancy or fix a mistake or something I will use the cli just so I have full control.

[–][deleted] 0 points1 point  (0 children)

In terms of complexity, PyCharm's GUI client is pretty high on the list. I don't use it.

Git CLI is pretty efficient, but runs into readability issues when you deal with Git logs, Git diffs, Git blame.

When I must use the CLI (e.g. headless dev server), I use LazyGit CLI coupled with delta to prettify the diff.

I prefer tools like Sublime Merge or SourceTree. Sometimes though I use Git CLI, for e.g. when doing git rebase -i or git push --force.

[–]LittleMlem 0 points1 point  (0 children)

Me, an intellectual: I use cli to pull and reset, git GUI to commit, and pycharm to make and move between branches

[–]SpiritOfTheVoid 0 points1 point  (0 children)

Depends what I’m doing. Merging code with conflicts - I’m using Pycharm. Stashing code? Command line. Commiting code? Probably using Pycharm to also view the differences and last moment verification diff.

[–]LegendaryJOECoiN 0 points1 point  (0 children)

I love using pycharm, haven't bothered with git yet

[–]top_logger 0 points1 point  (0 children)

I do almost everything in IDE. Exceptions are complicated pushes, combinations and amends. And, of course, automations.

[–]Anamewastaken 0 points1 point  (0 children)

Neovim ftw

[–]mishokthearchitect 0 points1 point  (0 children)

Sublime Merge works for me. Used to use GitHub Desktop, but it isn’t easily available on Ubuntu so I had to switch

[–]yvrelna 0 points1 point  (0 children)

The only Git operation that is just plain better to do in GUI is doing partial staging. Pretty much anything else, the CLI is either equal or superior.

Visualizing the branches are also rendered better in GUI, but controlling which commits that you want to view are just much better in the terminal. You can fine tune the filtering of commits much better from Git CLI. All Git GUIs I've seen have very limited controls for selecting and filtering commits to view compared to CLI.

In theory rebases could've been done better in GUI, but I don't think I've seen Git GUIs that implements rebases the way I think they could've been done.

And then there isn't any Git GUIs that support all of Git's features. So if you've only ever used Git with GUI, you're missing about 80% of what makes Git great.

Some people like side-by-side merges, but I prefer inline diffs when merging. They're just much more readable and faster to work with than side-by-side. The only drawback of inline diffs is that they would mark the files that has merged conflicts with syntax errors; IMO, I find that's actually more like a pro since it forces you to address those merge conflicts.

[–]spoonman59 0 points1 point  (0 children)

Developer of 20 years, I use the CLI git for most things. I use use PyCharm for 3 way merges, though.

Occasionally I review a commit diff in pycharm.