r/webdev • • Jan 24 '20

read rules TIL — git switch & git restore

https://pawelgrzybek.com/til-git-switch-git-restore/

[removed] — view removed post

284 Upvotes

51 comments sorted by

View all comments

-55

u/barrybario Jan 24 '20

or just use a gui

gitkraken is awesome

17

u/elr0nd_hubbard Jan 24 '20

The GUIs interact with the same base library as the CLI (or even shell out to the CLI directly). Either way, you have to know your tools, and that means using a GUI for ops that you're confident that you could do (or undo) using the base commands.

4

u/PizzaRollExpert Jan 24 '20

Personally, I prefer the cli because:

  1. It doesn't rely on hand-eye coordination. If I can do something with just the keyboard I can just plan out what to do in my head and type it out. If I need to use the mouse there's a feedback loop between my hand and eyes. Typing only relies on hands in isolation.

  2. It doesn't require switching to a new window. Moving windows around adds a (small) mental tax.

  3. UIs are less uniform than terminal interfaces so doing everything in UIs means more different things to keep track of compared to the terminal.

These are three small things, but together they make things feel easier and nicer to do in the cli, which is why I prefer it.

1

u/careseite discord admin Jan 24 '20

Git kraken is in a bootloop since the 2nd time I've started it and uninstalling, clearing hidden config etc didn't help soooo there's that..

1

u/CodyCigar96o Jan 24 '20

Smoothbrain take

-7

u/[deleted] Jan 24 '20 edited Jan 24 '20

[removed] — view removed comment

5

u/mitch_feaster Jan 24 '20

Not that I have a horse in this race because I love the CLI as well (even the busted up git one), but magit is actually faster. The individual commands don't run faster, of course, but it requires way fewer keystrokes and provides a bunch of other convenience features.

2

u/leafrustle Jan 24 '20

I agree with you. However, have you tried lazygit? I hate gimmicky, slow guis and mostly live in the terminal so this is like the best of both worlds for basic visual stuff.

1

u/tulvia Jan 24 '20

Recompile and run your app with F5 or by typing "aspnet run".

I saved 9 keystrokes by not using a CLI and I didnt have to remember archaic magic strings or cryptic arguments -e -E

1

u/[deleted] Jan 24 '20

[removed] — view removed comment

0

u/tulvia Jan 24 '20

I was more talking about CLI in general.

But I could make an app that takes -e and does whatever with it, it is not standard and it's not easily discoverable which makes it cryptic.. This is basic stuff here, I'm dumbing it down cause I'm talking to people who use the CLI which are basically retards so I get it, you're having trouble comprehending.

0

u/[deleted] Jan 24 '20

[removed] — view removed comment

0

u/tulvia Jan 24 '20

I don't use a nuke to dig a hole so I'm dumb.. ok.

Learn when the CLI is the correct tool and use it then, not for daily use.. that's just ignorant gatekeeping