←back to thread

1062 points mixto | 1 comments | | HN request time: 0s | source
Show context
boneitis ◴[] No.42942112[source]
I'm really interested and really hoping this is something I can sink my teeth into. I've always had frustrating experiences with trying to wrap my head around git and have to regularly use it at my job.

Branching, making commits, and creating pull requests come easy, but beyond that, I know utterly nothing about it.

replies(2): >>42942475 #>>42942759 #
beej71 ◴[] No.42942759[source]
If you do check it out and there are parts that are confusing, I'd love to hear about it.
replies(1): >>42943275 #
at_a_remove ◴[] No.42943275[source]
This is partially a question and the rest is shameful confession: I had haltingly used cvs as a solo programmer, and when I was suddenly no longer a solo programmer and had to use git, everything went haywire.

I am an Old and we never were taught anything about coding with other people who were also working on the same project. I have had many successful projects but never with another person.

With that as a background, does your guide cover things like:

1) Merging. I was told that merging happens "automagically" and I cannot, for the life of me, understand how a computer program manages to just ... blend two functions or whatever and it "works." Does your guide make sense of this?

2) Apparently there are holy wars (see also vi versus emacs) about the One True Way to ... decide on branches and whatnot. Are there pros and cons laid out anywhere?

3) Everything seems broken down into teensy tiny functions when I look at someone's git repository, just skillions of files all over the place. Is this a git thing, a code repository thing, or simply that, in order for multiple people to work on the same project, everything must be atomized and then reassembled later? What's your opinion?

replies(3): >>42944400 #>>42944723 #>>42948668 #
1. beej71 ◴[] No.42944723[source]
1) I say it happens automagically. :) I'm not really familiar with merging strategies, but I would imagine that it happens in a way similar to a diff. But it only works if the changes are "distant" from one another. If they are happening too close in the file, Git punts and tells you there's a conflict you have to manually resolve.

2) I try to stay out of holy wars. Use the right tool for the job, I say, and sometimes that could even be Emacs. ;) I do talk about a few of the more common options for branching in teams (mostly focused on the small teams we tend to have here in university). And I talk about their pros and cons. But I stop short of declaring one the winner since the best option depends on the circumstances. IMHO.

3) I've seen repos with big functions and small functions, so I don't think it's a Git thing. Students tend to write functions that do too much and are too large, but it's certainly possible to break things down into pieces that are prohibitively tiny. Overall this seems more of a software engineering design choice than anything Git-related.