The most inscrutable part of Git is rebasing and how it works. It took me really long to form a mental model where I can visualise how it does its job. I agree with the author that understanding how Git works is the only way to get comfortable with it. For eg, Rebasing is hard but you will have your "Aha!" moment when you realise that it is nothing but a combination of hard reset and cherry-pick
Understanding Git for real by exploring the .git directory
31–40 of 92 posts
Re: Understanding Git for real by exploring the .git directory
#32I worked with someone whose approach was very interesting: he committed the .git directory of a newly initialized repo to a separate, newly initialized repo. And then watched what changed when he added a file, changed things, branched, etc, in the committed .git directory. It's always seemed worthwhile to me to dig into git's model more, but if you're already comfortable and productive with stuff like detached head/r…
for about six months my git workflow was this: git add -A git commit -am "fixed some stuff" but I've finally found some time to start digging into how to really use it. The issue I have with it is that if you step outside the basics it's so easy to get yourself into a thorn bush and the way that git is explained most places is really not intuitive at all.
...
I also do this. :|
Re: Understanding Git for real by exploring the .git directory
#33I look at this, and then I look at people wondering why non-coders don't use version control, and I laugh and laugh.
Re: Understanding Git for real by exploring the .git directory
#34I worked with someone whose approach was very interesting: he committed the .git directory of a newly initialized repo to a separate, newly initialized repo. And then watched what changed when he added a file, changed things, branched, etc, in the committed .git directory. It's always seemed worthwhile to me to dig into git's model more, but if you're already comfortable and productive with stuff like detached head/r…
for about six months my git workflow was this: git add -A git commit -am "fixed some stuff" but I've finally found some time to start digging into how to really use it. The issue I have with it is that if you step outside the basics it's so easy to get yourself into a thorn bush and the way that git is explained most places is really not intuitive at all.
Re: Understanding Git for real by exploring the .git directory
#35Earlier quoted context omitted.
for about six months my git workflow was this: git add -A git commit -am "fixed some stuff" but I've finally found some time to start digging into how to really use it. The issue I have with it is that if you step outside the basics it's so easy to get yourself into a thorn bush and the way that git is explained most places is really not intuitive at all.
Try using a tool like 'git cola' that allows you to selectively commit soecific lines, instead of just by file. Start a project and attempt to maintain a clean history. Break up changes logically into separate commits. To the point where 90%+ don't need more than the subject to describe a change and the history can be read like a story. Use 'gitk --all' to view the tree of changes. get comfortable with using feature…
Re: Understanding Git for real by exploring the .git directory
#36How many "Understanding Git" posts have hit #1 on Hacker News? More than a few. How many have hit top 10? Surely dozens. Can we, please, take this as an indicator that Git is too fucking complicated? After the first thousand "Git made easy" blog posts it should have been apparent. Le sigh.
I personally think git is fucking awful.
... but it's the best version control system anyone's come up with so far. It sucks less than the alternatives and I use it for all my projects.
Re: Understanding Git for real by exploring the .git directory
#37Earlier quoted context omitted.
for about six months my git workflow was this: git add -A git commit -am "fixed some stuff" but I've finally found some time to start digging into how to really use it. The issue I have with it is that if you step outside the basics it's so easy to get yourself into a thorn bush and the way that git is explained most places is really not intuitive at all.
Ah yes, the "subversion" method of using git. ... I also do this. :|
Re: Understanding Git for real by exploring the .git directory
#38I've been using git at work for a couple of years and I haven't spent very much time thinking about the internals at all. It just seems to work pretty much, though sometimes I get into a weird state and just delete and redownload.
That's the thing, there is almost no reason to ever have to delete and redownload. Moreover, the reason that git is dominant is (network effects, and) because it is solving the right problem with the right internal abstractions. It has even managed to become popular in spite of its user interface.
Re: Understanding Git for real by exploring the .git directory
#39How many "Understanding Git" posts have hit #1 on Hacker News? More than a few. How many have hit top 10? Surely dozens. Can we, please, take this as an indicator that Git is too fucking complicated? After the first thousand "Git made easy" blog posts it should have been apparent. Le sigh.
I think most of us do agree. The official documentation is written as though the reader is already intimately familiar with the internals of git. I'm a smart guy, and I've read the official docs numerous times but every single time I failed to come away with a greater understanding than I had before. The commands are not particularly intuitive either. I personally think git is fucking awful. ... but it's the best ver…
Git might qualify as best FREE version control system anyone's come up with so far. But best? No, no I don't think so.
Re: Understanding Git for real by exploring the .git directory
#40https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Po...