Ask HN: What made you finally grok Git?
1–10 of 94 posts
Re: Ask HN: What made you finally grok Git?
#2Git for ages 4 and up - https://www.youtube.com/watch?v=1ffBJ4sVUb4
Re: Ask HN: What made you finally grok Git?
#3Re: Ask HN: What made you finally grok Git?
#4oh and never join any project that uses github and force squash-commits-on-pullrequest-merge. that is a sign that nobody there knows git or they don't care about code history.
edit: and yes, some rare times, rebase -i and moving things around will cause local conflicts. do not fear them. resolve and continue. it's all code you just wrote, should be easy and is part of the understanding process.
Re: Ask HN: What made you finally grok Git?
#5Then it just became a matter of mapping git CLI commands to how they manipulate the graph.
Re: Ask HN: What made you finally grok Git?
#6one has yet to witness the abomination that is svn, sourcesafe, or "software working on my machine" delivered by a zip file in order repent and mend ones ways
Re: Ask HN: What made you finally grok Git?
#7Re: Ask HN: What made you finally grok Git?
#8Messing with existing commits can be fine as long as you're messing with the only existing version of that commit. Commits that exist in other branches, have been shared with other people, have been pushed to remote, etc, should be left alone. Rebasing local, unpushed single commits in your one working branch is fine. Rebasing anything else will cause problems. If rebase is causing you problems, do not rebase.
Also: small commits, short branches, merge often.
Re: Ask HN: What made you finally grok Git?
#9When I realized it's just a DAG and you're just manipulating a graph and pointers. Then it just became a matter of mapping git CLI commands to how they manipulate the graph.
Re: Ask HN: What made you finally grok Git?
#10What's important to understand about git is that it allows time travel, and time travel enables changing history, and changing history is a really bad idea. Do not ever change the history without knowing what you're doing. In git, this means mostly rebasing and other stuff that messes with existing commits. Messing with existing commits can be fine as long as you're messing with the only existing version of that comm…