Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39431

Re: Slightly OTT - Git

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Slightly OTT - Git
Date Sun, 12 Apr 2020 16:57:19 +0200
Organization A noiseless patient Spider
Lines 68
Message-ID <r6va8f$ms$1@dont-email.me> (permalink)
References <r6ppnt$dkr$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Injection-Date Sun, 12 Apr 2020 14:57:19 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="561d7605348339b474f32d9d05436499"; logging-data="732"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/dYhk1U2dPBCjYteh2r/jD"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0
Cancel-Lock sha1:hXGdpzSwU3i6hGlZ1STq046O4Vw=
In-Reply-To <r6ppnt$dkr$1@dont-email.me>
X-Antivirus-Status Clean
Content-Language en-US
X-Antivirus AVG (VPS 200411-0, 04/11/2020), Outbound message
Xref csiph.com comp.lang.java.programmer:39431

Show key headers only | View raw


On 2020-04-10 14:44, Martin Gregorie wrote:
> For a variety of reasons I won't bore you with, I'm having to find out 
> about Git in a hurry, which is a bit of a shock to the system, since I've 
> been using CVS since the late '80s.
> 
> I have a copy of the "Git pocket Guide", but its almost useless - OK if 
> you need to do straight forward stuff for which it has a recipe, but 
> almost useless for getting an understanding on how Git works, how its 
> designed to work and how to use it in rather more complex circumstances, 
> such as with multiple remote repositories and the likes of GitLab.
> 
> "Professional Git" by Brent Laster (pub Wrox) looks like a possibility, 
> so I'd appreciate comments about it and/or pointers to other books.
> 
While I can't point you to specific resources for Git (I've found the
various online tutorials sufficient, if cumbersome to seep through),
here's a few observations derived from my working with it for a long
time and which may or may not prove useful.

First and perhaps most importantly, get your head wrapped around the DAG
(directed acyclic graph) concept, if you haven't already. That and the
distributed nature of Git is the most important thing to have in mind
when working with it.

The distributed nature means that your local and remote copies are
different and somewhat independent things. Because they are different
and yet woven together, it also means that working across repositories
(forking) becomes a natural part of the experience.

Secondly, Git is not a product; it's a tool made by a hacker (to wit,
Torvalds). This is important to keep in mind because when hackers
present something, they don't approach it through the lens of use-cases,
but rather, they lay out its capabilities as a tool. And given that it's
a very sophisticated tool, that presentation ends up being very complex
as well.

In fact, I would say the biggest ongoing effort -- ongoing for years and
just recently stabilising -- with respects to Git is finding proper
encapsulations of its huge complexity and power into standardised, and
thus easily usable, abstracted flows. GitFlow is one of these I would
recommend having a look at. I would venture guess that your own journey
with it will follow the same pattern: finding a subset of its functions
that you integrate into your workflow so you don't have to think of them
any more -- because not having to think about things is always the
ultimate goal of thinking.

Besides local and remote copies, and the pull requests this entails, you
need to understand merging, and the difference between merging and
rebasing -- which is one I, after a number of years, must admit I still
haven't figured out completely; but that is mostly because I haven't
really had to so far.

Aside from local, personal projects, for anything you work on that
involves other people I would recommend one of the established platforms
like GitHub and Bitbucket (I've used both and don't have a preference).
I would also strongly recommend IDE-integrations of Git. IntelliJ does a
very good job with this, and I expect others do, too. I've found the
IDE-integration to be preferable to the combination of IDE and a desktop
GUI -- but perhaps that's a matter of taste.

In closing, let me reiterate what personally was my main takeaway from
Git. Whereas often, software tools present us with simple entry points
which turn out not to be sufficient for real-world requirements, and
thus force us to dig beyond the surface to suit our needs -- Git is the
exact opposite. It's a beautiful thing.

-- 
DF.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Slightly OTT - Git Martin Gregorie <martin@mydomain.invalid> - 2020-04-10 12:44 +0000
  Re: Slightly OTT - Git Andreas Leitgeb <avl@logic.at> - 2020-04-12 14:37 +0000
  Re: Slightly OTT - Git Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-04-12 16:57 +0200
    Re: Slightly OTT - Git Martin Gregorie <martin@mydomain.invalid> - 2020-04-12 16:53 +0000

csiph-web