Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
cherry-pick is fine I think. cherry is pretty bad I'll admit but I don't have a better suggestion. cherry-hunt?

Adbot
ADBOT LOVES YOU

necrotic
Aug 2, 2005
I owe my brother big time for this!
It's not great but it lists the "cherries" you may want to then "pick".

cherry-orchard?

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
The problem is the established idiom is "git <verb> parameters". Cherry is not a verb. Here's where I'd browse the urbandictionary page for "cherry" to build a cheap joke but I'm posting from work and don't think that'd end well.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

find-cherry?

xtal
Jan 9, 2011

by Fluffdaddy
git ls-cherries

git cherry-pick -l

Ola
Jul 19, 2004

git import-commit <hash>

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Eggnogium posted:

The problem is the established idiom is "git <verb> parameters". Cherry is not a verb. Here's where I'd browse the urbandictionary page for "cherry" to build a cheap joke but I'm posting from work and don't think that'd end well.

Verbing weirds language.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

I only have the same complaint about git as everybody else: the CLI is a mess of basic functions hidden between nonsensical flags, piping only works half the time, and whoever's in charge tries to fix this by adding on even more redundant commands instead of making a new porcelain from scratch with the benefit of hindsight. Why does 'git branch butt | git checkout' work but not 'git branch butt | git switch'? Why does 'git checkout -b' exist? Why does '--list' work on some commands but not others? Why does 'git add .' stage all new/changed/deleted files, but 'git commit -a' commits only changed/deleted files? There's probably good reasons for some or even all of these, they may be correct but they're all surprising: it would be better not to have shortcuts than to have inconsistent ones.

Nonetheless, these are all extremely minor annoyances. Git is like democracy: the worst system we've found, except for all the rest.

And except for Fossil.

Everybody who's used Fossil seems to love it, and it comes from the SQLite guys who have made one of the greatest software tools in the world so I can totally believe that their SCM system is equally amazing. I'm gonna try it one of these days, and when I finally go insane and decide to start my own company, I'll be the crazy weird boss that forces the youngsters to use this obscure SCM that doesn't even work with my GitInstaSnapTweetHub® cloud social identity.

QuarkJets
Sep 8, 2008

Ola posted:

Fair enough that I might be wrong about revert. But picking something that wasn't ambiguous might be better. They probably had a huge screaming fight over why "undo" wouldn't work. "Cherry pick" is obviously a well known idiom, but what exactly do you cherry pick with that command?


Is that really the act of cherry picking?

The word "revert" as in "revert this" means returning something to a previous state, that meaning predates computer science and is not ambiguous

Pentecoastal Elites
Feb 27, 2007

git CLI is easy because there's only a small handful of things you need to actually remember, then when you run into an issue there's a stackoverflow page that tells you exactly what you need to do

everyone only ever runs into the same 5-6 "hard" git problems. it doesn't matter that git has a thousand weird commands and parameters because if you ever know/care about them you're doing expert-level git stuff anyway.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

tbh, I'm not sure if I understand git better or if the CLI has gotten better. One thing that has changed - automatic completion of the commands and flags make a huge difference in discoverability.

Volguus
Mar 3, 2009

Pentecoastal Elites posted:

git CLI is easy because there's only a small handful of things you need to actually remember, then when you run into an issue there's a stackoverflow page that tells you exactly what you need to do

everyone only ever runs into the same 5-6 "hard" git problems. it doesn't matter that git has a thousand weird commands and parameters because if you ever know/care about them you're doing expert-level git stuff anyway.

Exactly this. Therefore , I assume that the people who prefer git GUIs fall into 2 camps:

- integrators, who essentially all they do all day is unfuck broken commits from a bazillion branches at the same time and an UI provides them with a much better understanding of whatever it is they're doing
- people who cannot be bothered to remember the 5 git commands you actually need to do your job on a daily basis

Personally I am a lowly git user. I use and know as few commands as possible to be able to do my work. Therefore, using the CLI is just simpler and easier. I add, commit, push, pull, clone, merge and checkout. That's I think pretty much the extent of my interaction with git and I like it this way. When I need to do more it means somebody thought they know better and they hosed up the backup git repo and now I have to fix it. Turns out they do not know better and now I have to find on google how to unfuck their fuckup. Sigh: simple is better. Always.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

The first reason I most often use a git gui (in jetbrains ide):

I get in the zone for two hours and don't commit or I'm just working on a change with a lot of cross-cutting concerns.

1. My gui shows the dozen changed files.
2. I click a file, it shows the changes in a nice way with a diff.
3. I pick the changes from each file I want in a commit by clicking a checkbox.
4. Make a commit of those changes.
5. Go back to step one until I've put all the work for the past two hours into nice logical and atomic commits.

The second reason I most often use a git gui:

Three-way merging (not exactly git exclusive, but I like it so much).

1. Pull changes from remote.
2. Have changes in same file locally.
3. Get a three pane layout with my changes on the left, remote changes on the right, merge results in the middle.
4. Each change on left and right has a nice flow-y-ish graphic visual indicating where the change would fit into the merged result.
5. I click a button to move a change from either side into merge result or discard the change.
6. Revel in the majesty.

I've spent extensive time doing both of these via command line and stuff like vim and the like. The graphical way of doing it is just better and less prone to mistakes for me.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Git Koans

quote:

A Python programmer handed her ~/.gitconfig to Master Git. Among the many lines were the following:

code:
[alias]
; Explicit is better than implicit.  If we want to merge
; we should do so ourselves.
pull = pull --ff-only
Master Git nodded. “git pull origin master,” said the programmer.

Master Git pulled down the latest changes on master and automatically merged them with the programmer’s changes.

“But Master Git, did I not say to only fast-forward in my configuration?!” she cried.

Master Git looked at her, nodded, and said nothing.

“Then why did you not warn me of a problem with my configuration?” she asked.

Master Git replied: “there was no problem.”

Months later the programmer was reading git --help config for a different reason and found enlightenment.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Pentecoastal Elites posted:

git CLI is easy because there's only a small handful of things you need to actually remember, then when you run into an issue there's a stackoverflow page that tells you exactly what you need to do

everyone only ever runs into the same 5-6 "hard" git problems. it doesn't matter that git has a thousand weird commands and parameters because if you ever know/care about them you're doing expert-level git stuff anyway.

No one thinks it's hard to commit a single file change or any of the few straightforward things.

The problem is that the basic things you need to step out of those basic things 5% of the time and when you google how to do them, you end up copy pasting stuff you don't understand because the commands to do the things you need to do just don't make any sense.

So yeah, if you ignore the bad stuff then it's all good.

tak
Jan 31, 2003

lol demowned
Grimey Drawer

Thermopyle posted:


Three-way merging (not exactly git exclusive, but I like it so much).


4-way merging (or the 3-way merge conflict style built in to git) is awesome

My side
The common ancestor of both
Their side
(The merge result, if 4-way)

It makes it so much easier to resolve complicated conflicts

Choosing which changes in each file to stage/commit in a GUI is a really good thing though (combined with interactive rebasing via GUI too, jetbrains has this now)

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

tak posted:

4-way merging (or the 3-way merge conflict style built in to git) is awesome

My side
The common ancestor of both
Their side
(The merge result, if 4-way)

It makes it so much easier to resolve complicated conflicts

Choosing which changes in each file to stage/commit in a GUI is a really good thing though (combined with interactive rebasing via GUI too, jetbrains has this now)

I love 3 way merge but sometimes kdiff is really unclear about which window is which source and it takes me a minute to get my bearings. I have definitely hosed up a merge enough to hose a branch before as a result back at epic where I had to use svn.

BTW thanks to whoever mentioned tig, I love it

tak
Jan 31, 2003

lol demowned
Grimey Drawer

jit bull transpile posted:

I love 3 way merge but sometimes kdiff is really unclear about which window is which source and it takes me a minute to get my bearings. I have definitely hosed up a merge enough to hose a branch before as a result back at epic where I had to use svn.

BTW thanks to whoever mentioned tig, I love it

Yeah I don't miss that at all about svn

p4merge is excellent and works fine with git, there are lots of others that can do 4 way merges though

b0lt
Apr 29, 2005
I can't believe that the complaints about git's user interface are about the naming of revert and cherry and not things like `git push remote :branch` and `git rerere`

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

tak posted:

Yeah I don't miss that at all about svn

p4merge is excellent and works fine with git, there are lots of others that can do 4 way merges though

We are slowly moving from perforce to git and it is a good thing, but I need to ask if we will still be able to use p4merge for diffing and merging, or find another tool that presents things the same way, because the presentation of diffs built in to Visual Studio is lacklustre IMO.

comedyblissoption
Mar 15, 2006

You can get p4merge as a standalone free tool from choco or whatever.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

comedyblissoption posted:

You can get p4merge as a standalone free tool from choco or whatever.

That's good to know. That was pretty much the only thing I had reservations about.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
most of the problems people have with git are social, rather than technical, problems. if you're constantly cursing the tides while doing 4-way merges then maybe you should look at the process rather than curse the tools.

Happy Thread
Jul 10, 2005

by Fluffdaddy
Plaster Town Cop
Seems like that one could be better phrased as a Koan

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug
I'd love to understand the rationale of why Git uses the term "checkout" to mean "set working branch", instead of what it means in every other version control system that uses the same term: "take an exclusive lock on a file for editing". That just seems cruel, and it causes new users no end of confusion. Just don't use the term "checkout". It's already defined in the VCS world; you don't have something equivalent. That's fine.

OddObserver
Apr 3, 2009
Uhh, the real horror is that this is year 2019 and there are still people who remember being subjected to version control systems with exclusive checkouts as a dominant development model, despite it being obsolete since like 30 years ago.

LOOK I AM A TURTLE
May 22, 2003

"I'm actually a tortoise."
Grimey Drawer

New Yorp New Yorp posted:

I'd love to understand the rationale of why Git uses the term "checkout" to mean "set working branch", instead of what it means in every other version control system that uses the same term: "take an exclusive lock on a file for editing". That just seems cruel, and it causes new users no end of confusion. Just don't use the term "checkout". It's already defined in the VCS world; you don't have something equivalent. That's fine.

In SVN "checkout" is roughly "clone", so I'd say there was already tenuous agreement on what it meant before git.

Achmed Jones
Oct 16, 2004



I think it’s funny that most of the complaints about git that I see in this thread could be solved with ten minutes and setting some aliases or remembering some things

The only thing I remember sucking is dealing with which parent is which when trying to revert a merge. I’m sure there’s other stuff that’s user-hostile that I’m forgetting, but I probably never had to use most or all of it 🤷‍♀️

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Achmed Jones posted:

remembering some things

"It's easy to avoid all the gotchas if you just remember them all"

Ola
Jul 19, 2004

Achmed Jones posted:

The only thing I remember sucking is dealing with which parent is which when trying to revert a merge.

Why don't you just remember it?

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

New Yorp New Yorp posted:

I'd love to understand the rationale of why Git uses the term "checkout" to mean "set working branch", instead of what it means in every other version control system that uses the same term: "take an exclusive lock on a file for editing". That just seems cruel, and it causes new users no end of confusion. Just don't use the term "checkout". It's already defined in the VCS world; you don't have something equivalent. That's fine.

I've never used a VCS where "checkout" means "take an exclusive lock on a file" and git is far from the only VCS I've used.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Plorkyeran posted:

I've never used a VCS where "checkout" means "take an exclusive lock on a file" and git is far from the only VCS I've used.

You've never had to use something like VSS then. A VCS implemented as a file system (!)

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Plorkyeran posted:

I've never used a VCS where "checkout" means "take an exclusive lock on a file" and git is far from the only VCS I've used.

Okay, I'm wrong. Everyone uses the term to mean different things. So every version control system is wrong, clearly.

Absurd Alhazred
Mar 27, 2010

by Athanatos

New Yorp New Yorp posted:

Okay, I'm wrong. Everyone uses the term to mean different things. So every version control system is wrong, clearly.

My version control of new_result_paper_053.doc is superior to all of these, of course.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

OddObserver posted:

Uhh, the real horror is that this is year 2019 and there are still people who remember being subjected to version control systems with exclusive checkouts as a dominant development model, despite it being obsolete since like 30 years ago.
Let me tell you about Perforce.

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


New Yorp New Yorp posted:

I'd love to understand the rationale of why Git uses the term "checkout" to mean "set working branch",

:nono:

quote:

“How should I change to a different branch?” asked the programmer.

“Use git checkout.”

“And how should I create a branch?”

“Use git checkout.”

“And how should I update the contents of a single file in my working directory, without involving branches at all?”

“Use git checkout.”

After this third answer, the programmer was enlightened.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Volmarias posted:

You've never had to use something like VSS then. A VCS implemented as a file system (!)

I actually did use VSS at one job. At least with how they had it configured, checking out a file made it writeable but didn't acquire an exclusive lock by default (and in practice you never could acquire an exclusive lock because there was always that person who had the entire repo checked out).

Achmed Jones
Oct 16, 2004



Ola posted:

Why don't you just remember it?

After doing it a couple times, I did.

QuarkJets
Sep 8, 2008

Thermopyle posted:

"It's easy to avoid all the gotchas if you just remember them all"

Most of these complaints are just nitpicks though, "I don't like the way that 'git cherry' is named" isn't a pitfall and is easily solved with an alias

Adbot
ADBOT LOVES YOU

Qwertycoatl
Dec 31, 2008

I briefly used VSS at some contracting thing. Almost every time I tried to check out a file, it was already checked out by someone who was on holiday so I had to ask some admin to force-decheckout it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply