What Git is not? It's not SVN, it's not a lifesaver, it's not a backup, it's not an enigma, it's not a nightmare.
Just the right combination of tiny fractions of all of the above done in the most straightforward way :)
Well I lied you, it's borderline anti-SVN (The author introduces Git to Google devs on May 03, 2007)
Alternative approach
- what is a hash? is MD5 broken?
- who is DAG? Where do Mercle trees grow?
- blob, tree, commit
- branch, tag, index
- git fetch
- git pull
- git add # what's Git index btw?
- git reset # oops, i've added smth. unwanted!
- git diff
- git diff --stat
- git diff HEAD
- git commit
- git push (if you have privs!)
- git log --oneline -10
- git show --stat d7970a4d
- git diff --stat .. ..
- Respect logs, separate code / formatting commits
- what does your commit look like on Github? in IDEA?
- 50/72 rule
- git checkout -b mycrap # if you are cautious enough
- git stash # otherwise (git stash list; git stash pop)
- git stash -b mycrap
- git add / git commit
- git checkout
- git merge mycrap
- <fix conflicts, commit>
- git branch -d mycrap
- git commit --amend
- if you are late - seek seniors' help! But do this, and do it soon!
- it's plain ugly
* d7970a4d (HEAD -> eminer35, origin/exactpro/config_miner_v35) add scripts and docs for token_bootstrapper_light
* 94c40d76 OSX 0.0.0.0 fix
* 51560a54 cenm-kostroma oracle
* 50253a08 cenm-kostroma oracle
* 5be55679 oracle for CENM
* 29af68d2 cenm-kostroma
* c916cba9 cenm-kostroma
* 8ab81c07 cenm-kostroma
* f83759cd cenm-kostroma
* b26fd4c6 cenm-kostroma
* ec4fd9bc cenm-kostroma
* f5e5a929 cenm-kostroma
* 2d4b89f5 cenm-kostroma
* b3d9bc28 configure node logging
* 70a64f59 Merge branch 'exactpro/config_miner_v35' of https://github.com/corda/behave into exactpro/config_miner_v35
|\
| * caff262c use ENT-4.2-RC77 name, ENTERPRISE/4.2-RC77/ folder
* | 6d92d38e ha proxy test
|/
* 110751c2 stop ha proxy
* 43671a15 cenm-signer
* 2abc8b59 cenm-signer
- and getting uglier
- but it's not that hard to avoid
git fetch # before commit
git pull --rebase # if there're changes
git commit
git push
- Bad messages; reoder, squash commits.
git rebase -i <good-commit>
- alias gl1='git log --oneline'
- tags
- tracking rebased branch (secret link)
- tracking renamed files - TODO
- git blame
This is NOT ok!
This is OK
Building blocks
The story goes that the very first beta Google server was made of Duplo bricks cause cheaper generics were not rigid enough ;)
pic source
Real Google-1999 and story
side view
Git building blocks