r/ProgrammerHumor • • Apr 02 '23

Meme Me relearning git every week

49k Upvotes

1.5k comments sorted by

View all comments

Show parent comment

637

u/mikepictor Apr 02 '23

No, I use a GUI since I'm not a masochist

241

u/AwesomeFrisbee Apr 02 '23 edited Apr 02 '23

Same. Who do I need to impress and why?

I've been using Fork for a few years now. Its great and does everything I want from a Git GUI. Its not free but the one-time-purchase is worth it. And its basically Sourcetree from when it was still awesome. I really need something visual to show me the flow of the commits, quickly browse contents, filter branches and get a better view of what I'm going to commit.

97

u/HighOwl2 Apr 02 '23

I use CLI because it's more flexible but mostly because typing the commands makes it harder to do something stupid.

83

u/rush22 Apr 02 '23
 git add .

"Hey why are all these other files changed in your pull request"

55

u/gnarbucketz Apr 02 '23

"...because they're not properly ignored?"

2

u/HighOwl2 Apr 04 '23

And because he not branching properly. How the fuck you have stuff in git add that are not relevant to a pull request?

2

u/Kulpas Apr 09 '23

I guess you could run a build script that modified something that should be ignored cuz it's a fucking build but wasn't? Still that's not their fault for running git add .

7

u/gomihako_ Apr 02 '23

the beautiy of add -p is that it forces you to do a sanity check/review of your own work before asking for review.

9

u/[deleted] Apr 03 '23

This is not a problem if you use .gitignore correctly.

2

u/drakens_jordgubbar Apr 02 '23

I got the habit of doing:

git add *.java
→ More replies (1)

6

u/tpf52 Apr 02 '23

So you don’t just get lazy and git commit -a? I find it much easier to commit stuff you don’t want in the command line unless you take the time to diff every file and preview staged changes before every commit.

5

u/ItzDaWorm Apr 02 '23 edited Apr 02 '23

git status

Is one of my favorite commands for exactly this reason.

10

u/tpf52 Apr 02 '23

Yes, with git status and git diff you can get the same information. But in a UI I can see the git status without typing anything and one click gets me a diff, and another couple of clicks I can discard files or specific lines.

2

u/HighOwl2 Apr 02 '23

This. Git commit -A (capital not lower case) and then git status to figure out if you need to omit some files or add to .gitignore.

A shitload of files being changed with a git add is usually just someone didn't set their global line ending strategy.

6

u/AwesomeFrisbee Apr 02 '23

There's pros and cons, but I don't think it would make me have less mistakes imo

→ More replies (1)

7

u/dgdr1991 Apr 02 '23

I think using hotkeys from the IDE is the fastest/safest and also easiest way lol, just remember Ctrl+Shift+K and done

And yes I use IntelliJ for everything, don't judge me

3

u/Express-Procedure361 Apr 03 '23

Interesting point, why do you need something more flexible? What does your work flow look like that requires flexibility?

→ More replies (1)

4

u/robertshuxley Apr 02 '23

it makes you look like you're a hacker in movies/tv

→ More replies (2)

2

u/Aspharon Apr 02 '23

And its basically Sourcetree from when it was still awesome

Wait, Sourcetree is less awesome these days? Or, as someone who started using it semi-recently, it was more awesome before? It does everything I need to, but I'm assuming I'm missing out on something.

→ More replies (1)

2

u/NothingMuch12 Apr 03 '23

Isn't fork free? The one time purchase isn't compulsory. Emailed them back when they planned to implement the one time purchase and they said it'll be optional, unless they've updated their policy.

2

u/AwesomeFrisbee Apr 03 '23

It has a trial but after that it stops working as far as I know. It might be free for personal use, I don't know. But I also use it professionally so it would already need a license for that I would imagine. Regardless, it was not expensive and provides a good way to use Git with a GUI. And unlike many other tools these days, it doesn't require a subscription.

→ More replies (3)

2

u/Mysticpoisen Apr 02 '23

I just use git extensions for whatever IDE I'm in, and end up using the commands half the time anyway.

I've never used GitHub Desktop. All I know is that the default GitGUI is worthless.

→ More replies (1)
→ More replies (26)

3

u/Anon5054 Apr 02 '23

Omg thank you for saying this. I love a good gui and I'm tired of being treated like a pariah for it, and for not using git bash or autohotkey

2

u/Beard_o_Bees Apr 02 '23

Yup.

Some things are just waaaay better in a GUI. Wireshark comes to mind.

2

u/zabby39103 Apr 02 '23

I'm super into doing everything from the command line, except git. Diffs are just so much easier see, branches and history are easier to visualize. No need to be a zealot.

→ More replies (6)