The curious coder’s guide to git¶
You’ll find the main tutorial starts at Learn git right for a long and happy life, and follows on through A curious tale to Curious git.
The other pages assume you’ve read the main tutorial sequence.
You can also read the main tutorial as a PDF.
- Learn git right for a long and happy life
- A curious tale
- The end of the story
- The story begins
- The dog ate my results
- Deja vu all over again
- Gitwards 1: make regular snapshots
- Gitwards 2: reminding yourself of what you did
- Gitwards 3: breaking up work into chunks
- Gitwards 4: getting files from previous commits
- Gitwards 5: two people working at the same time
- Gitwards 6: how should you name your commit directories?
- A diversion on cryptographic hashes
- Gitwards 7: naming commits from hashes
- Gitwards 8: the development history is a graph
- Gitwards 9: saving space with file hashes
- Gitwards 10: making the commits unique
- Gitwards 11: away with the snapshot directories
- Gitwards 12: where am I?
- You are on the on-ramp
- Curious git
- Basic configuration
- Getting help
- Initializing the repository directory
- Updating terms for git
git add
– put stuff into the staging area- The git staging area
- Git objects
- Hash values can usually be abbreviated to seven characters
git status
– showing the status of files in the working tree- Staging the other files with git add
git commit
– making the snapshotgit log
– what are the commits so far?git branch
- which branch are we on?- A second commit
git diff
– what has changed?- You need to
git add
a file to put it into the staging area - An ordinary day in gitworld
- Commit four
- Undoing a commit with
git reset
- Pointing backwards in history
- A new fourth commit
- The fifth commit
- Getting a file from a previous commit –
git checkout
- Using bookmarks –
git branch
- Changing the current branch with
git checkout
- Making commits on branches
- Merging lines of development with
git merge
- The commit parents make the development history into a graph
- Other commands you need to know
- Git: are you ready?
- Other git-ish things to read
- git remotes - working with other people, making backups
- Keeping backups with remotes
- Start with a git repository
- Make the empty backup repository
- Tell the current git repository about the backup repository
- git push – push all data for a local branch to the remote
- git push – synchronizing repositories
- git clone – make a fresh new copy of the repository
- git fetch – get all data from a remote
- git pull – git fetch followed by git merge
- Linking local and remote branches
- Remotes in the interwebs
- Deeper inside git