Skip to content

Instantly share code, notes, and snippets.

@zmalltalker
Created June 6, 2016 09:32
Show Gist options
  • Save zmalltalker/fbed0d8884e9c1d6b50f18532003f3fb to your computer and use it in GitHub Desktop.
Save zmalltalker/fbed0d8884e9c1d6b50f18532003f3fb to your computer and use it in GitHub Desktop.

High level

Graph/log

All commits have at least one parent. Commits with more than one parent are called merge commits The child/parent relationship are visualized as train tracks

All Git repositories were created equal

Exactly the same contents. No difference between server versions and local versions.

Remotes

Remotes are other clones of your repository, served via a URL Local remotes or remote (SSH/HTTP) remotes

Tracks content, not files

Each commit is a snapshot of all the contents in your repository (not a diff)

The .git directory

This is your repository. Remove it and it’s no longer a repo. Remove all the files, and your files are still there The HEAD file The refs directory The objects directory

The index (stage/unstage)

Working directory -> Staging area -> Repository (.) -> (index) -> (.git)

Rebase

Merging & conflicts

Some more detail

Git types

tree

blob

commit

Basic commands

git init

git log

git add

git merge

git commit

git push

git checkout

git branch

git status

Git clients

GitHub

A glorified remote Pull requests Web hooks Wikis Organizations Graphs etc.

Git flow

Future topics

Hooks

Reflog

Submodules

Patch/am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment