Flexibling Git - Be a Happier Developer with Git

Post on 13-Feb-2017

46 views 3 download

Transcript of Flexibling Git - Be a Happier Developer with Git

Be a Happier Developer

with

...opp!

Be a Happier Developer

with

:-)

Git makes more sense when you understand “X”

Why was it made?

git is … not this

git is… snapshots, not differences

so deep!“everythings is check-

sumed”

no deletion!so...only ADD

Too big?

Linux Kernel:- 15+ milions LoC

- 12k non-merged commits

- 1300+ contributors

--every-things is local

The ”three states”

...

--amendreate a new commit and use it to replace the last one

Stashing-Tool

Sumary

Commit

so deep!

VisualizingGit Repository

With visualize tools

...more serious

With `git log` command

Naming that ***king SHA-

1, plzz!Refs - pointers to commits

heads

attacked/detacked HEAD

Sumary

Reset

First Step:Move back the

HEAD

Second Step:Reset Staging-

Area

Third Step:Reset Working-

Directory

give git-reset a <path>

- Dont touch the head- Touch only the <path>

Squashing

Check it out!

Summary

Branching

Cheap branching

Attach HEAD to branch

Move forward

Merging A into B

Merging A into B: fast-forward

Merging A into B: fast-forward (2)

Merging A into B: no-fast-forward

Merging A into B: no-fast-forward (2)

Merging A into B: resolve conflict

Rebasing: move branch's root

Summary

Syncing

git-remote

tracking branch

update refs

update refs,and merge!

BDDD

BDDD (2)

update refs,and rebase!

Update remote

Next Chapter: Make Your Collaborators More Happy With Git