SlideShare a Scribd company logo
Git: An introduction of plumbing and porcelain commands
Welcome!
Jingwei "John" Liu
ๅˆ˜ๆ•ฌๅจ
@th507
http://ljw.me
Quick Poll
How many of you have use Git?

SVN?

git rebase?
Letโ€™s look at git from another perspective.
Git: An introduction of plumbing and porcelain commands
โ€ข distributed version control

โ€ข working/staging area

โ€ข how it works
VCS: Version Control System
Version Control System
โ€ข storing content

โ€ข tracking changes to the content

โ€ข distributing the content

โ€ข keep accurate yet human-readable history
VCS: Types and choices
โ€ข No remote repository

โ€ข Central repository

โ€ข Distributed (with remote) repository
Brutal Force VCS
โ€ข Been there, done that.

โ€ข Really not very informative

โ€ข Which version to use?
essay.doc
essay_2.doc
essay3.doc
essay_final.doc
essay_final2.doc
eassay_final3.doc
esassy_finalfinal.doc
esassy_finalfinal2.doc
Centralized vs. Distributed
VCS Design
Centralized model
all changes to the repository must transact via one
speci๏ฌc repository for it to be recorded in history at all.

Distributed model
where there will often be publicly accessible repositories
for collaborators to "push" to, but commits can be made
locally and pushed to these public nodes later, allowing
o๏ฌ„ine work.
Centralized model
Repository
Working CopyWorking Copy
checkout
update
log
diff
commit
Distributed Model
Remote Repository
pull push
commit commit
checkoutcheckout
Working Copy Working Copy
log
diff
Local Repositories
Centralized vs. Distributed
โ€ข Delta-based changeset (linear history)

โ€ข Directed Acyclic Graphs (DAG) representation
Distributed VCS
โ€ข distributed work๏ฌ‚ows

โ€ข safeguard against data corruption

โ€ข (reasonably) high performance

โ€ข collaborators could work o๏ฌ„ine

โ€ข collaborators could determine when their work are
ready to share
Plumbing and Porcelain
Git Commands: Plumbing and Porcelain
plumbingโ€จ
plumbing consists of low-level commands that enable
basic content tracking and the manipulation of directed
acyclic graphs (DAG)

porcelainโ€จ
smaller subset of git commands that most Git end users
are likely to need to use for maintaining repositories and
communicating between repositories for collaboration
Low Level Commands (Plumbing)
cat-file, commit-tree, count-objects, diff-index, for-
each-ref, hash-object, merge-base, read-tree, rev-
list, rev-parse, show-ref, symbolic-ref, update-index,
update-ref, verify-pack, write-tree
High Level Commands (Porcelain)
commit/push/pull/merge/โ€ฆ
โ€ข meant to be readable by human

โ€ข not meant to be parsed

โ€ข susceptible to changes/evolutions
Describing Changeset with Hash Value
Pros
โ€ข Same content never duplicate

Cons
โ€ข Managing multiple ๏ฌles?

โ€ข Managing history?

โ€ข Hard to understand hash values
Vernaculars and Plumbing Commands
Git Vernaculars
blob
	 stores ๏ฌle content.

tree
	 stores directory layouts and ๏ฌlenames.

commit
	 stores commit info and forms the Git commit graph.

tag
	 stores annotated tag
Git: A Quick Glance
โ€ข Content address-able database

โ€ข Key is SHA-1 hash of objectโ€™s content

โ€ข Value is the content

โ€ข Same content never duplicate
Setup
$ git init demo; cd demoโ€จ
Initialized empty Git repository in demo/.git/
# monitoring .git folderโ€จ
# if you are using bash, thenโ€ฆโ€จ
$ while :; do tree .git; sleep 2; done
object in Git
Same content never duplicate
Parsing Object
$ echo "test content" | git hash-object -w --stdinโ€จ
d670460b4b4aece5915caf5c68d12f560a9fe3e4
$ find .git/objects/ -type fโ€จ
.git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4
$ git cat-file -p d670โ€จ
test content
$ git cat-file -t d670โ€จ
blob
hash-object in Git
content 	 = 	"test content"

header = 	"blob %d0", length_of(content)

store 	 	 = 	header + content

sha1 = 	sha1_of(store)

dir 	 	 	 = 	".git/objects/" + sha1[0:2] + "/"

๏ฌlename 	 = 	sha1[2:]

write(dir + ๏ฌlename, store)

# Save compressed header + content
hash-object in Git
$ echo "Simon" > test.txt
$ git hash-object -w test.txtโ€จ
83fba84900292b2feb7e955c72eda04a1faa1273
$ echo "Garfunkel" > test.txt
$ git hash-object -w test.txtโ€จ
6cc4930db0f5ccd17f0bc7bfe0ae850b1b0c06a2
$ git cat-file -p 83fbโ€จ
Simon
cat test.txtโ€จ
Garfunkel
tree Object
โ€ข point to other objects (hashed)
with name

โ€ข a root tree Object is a snapshot
tree Object
$ mkdir favorites; echo "fantastic" > favorites/band
$ git update-index --add test.txt favorites/band
$ git write-treeโ€จ
d0ef546493e53c3beb98e5da4f437e581ff3c7e0
$ git cat-file -p d0efโ€จ
040000 tree 94b88a81db61ed617621138bc172aa6f3a408545
favoritesโ€จ
100644 blob 6cc4930db0f5ccd17f0bc7bfe0ae850b1b0c06a2
test.txt
$ git cat-file -p 94b8โ€จ
100644 blob 744c44c7d1ffb9be8db8cd9f1e2c47830ca6f10b band
Data Structure
T1
F1
F2
6cc4
test.txt
94b8
favorites
1db7
band
T2
3266
tree
tree Object
$ echo "Byrds" > test.txt
$ git update-index --add test.txt
$ git write-treeโ€จ
3266237ac900a5f09c266b7d6bc79bde6a2386df
$ git cat-file -p 3266โ€จ
040000 tree 94b88a81db61ed617621138bc172aa6f3a408545
favoritesโ€จ
100644 blob 1db792a2c726b393332a882fe105bc3ade4ddb66
test.txt
$ git cat-file -p 1db7โ€จ
Byrds
T1
F1
F2
6cc4
test.txt
94b8
favorites
6cc4
band
T2
T3
F3
Data Structure
1db7
test.txt
d0ef
tree
3266
tree
commit Object
โ€ข explain a change: who/when/why

โ€ข point to a tree object with above info

โ€ข pointer, not delta
commit Object
$ echo "test commit" | git commit-tree d0efโ€จ
1fa215b14c27f2739515eb8410f06478eb0c423e
$ git cat-file -p 1fa2โ€จ
tree d0ef546493e53c3beb98e5da4f437e581ff3c7e0โ€จ
author Jingwei "John" Liu <liujingwei@gmail.com>
1407123580 +0800โ€จ
committer Jingwei "John" Liu <liujingwei@gmail.com>
1407123580 +0800โ€จ
โ€จ
test commit
T1
F1
F2
6cc4
test.txt
94b8
favorites
6cc4
band
T2
Data Structure
Commit 1
d0ef
tree
1fa2
commit
commit Object
$ echo "another test commit" | git commit-tree 3266 -p
1fa2โ€จ
ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf
$ git cat-file -p ded1โ€จ
tree 3266237ac900a5f09c266b7d6bc79bde6a2386dfโ€จ
parent 1fa215b14c27f2739515eb8410f06478eb0c423eโ€จ
author Jingwei "John" Liu <liujingwei@gmail.com>
1407123885 +0800โ€จ
committer Jingwei "John" Liu <liujingwei@gmail.com>
1407123885 +0800โ€จ
โ€จ
another test commit
commit Object Anatomy
$ echo "another test commit" | git commit-tree 3266 -p
1fa2โ€จ
ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf
$ git cat-file -p ded1โ€จ
tree [SHA-1]โ€จ
parent [SHA-1]โ€จ
author [name] [email] [timestamp] [timezone]โ€จ
committer [name] [email] [timestamp] [timezone]โ€จ
โ€จ
[commit message]
T1
F1
F2
6cc4
test.txt
94b8
favorites
6cc4
band
T2
T3
F3
Data Structure
1db7
test.txt
Commit 1 Commit 2
parent
d0ef
tree
3266
tree
1fa2
commit
ded1
commit
commit Object
โ€ข contains metadata about its ancestors

โ€ข can have zero or many (theoretically unlimited) parent commits

โ€ข initial commit has no parent

โ€ข three-way merge commit has three parents
reference in Git
โ€ข stored in .git/refs

โ€ข SHA-1
reference in Git
# create a branchโ€จ
$ echo "1fa215b14c27f2739515eb8410f06478eb0c423e"
> .git/refs/heads/test-branch
$ git branchโ€จ
* masterโ€จ
test-branch
$ git log --pretty=oneline test-branchโ€จ
1fa215b14c27f2739515eb8410f06478eb0c423e test commit
$ find .git/refs/heads -type fโ€จ
.git/refs/heads/masterโ€จ
.git/refs/heads/test-branch
reference in Git
$ git update-refs refs/heads/master
ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf
$git log --pretty=oneline masterโ€จ
ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf another test
commitโ€จ
1fa215b14c27f2739515eb8410f06478eb0c423e test commit
$ cat .git/refs/heads/masterโ€จ
ded15c0a38dcf226cfbc4838a9d78cd3f8d82bafโ€จ
reference in Git
$ cat .git/HEADโ€จ
ref: refs/heads/master
$ git branchโ€จ
test-branchโ€จ
* master
$ git symbolic-ref HEAD refs/heads/test-branch
$ cat .git/HEADโ€จ
ref: refs/heads/test-branch
T1
F1
F2
6cc4
test.txt
94b8
favorites
6cc4
band
T2
T3
F3
Data Structure
1db7
test.txt
Commit 1 Commit 2
parent
refs/heads/test-branch refs/heads/master
d0ef
tree
3266
tree
1fa2
commit
ded1
commit
HEAD/head in Git
โ€ข HEAD is symbolic references. It points to another
reference

โ€ข use ref, not SHA-1

$ cat .git/HEADโ€จ
ref: refs/heads/master
$ git branchโ€จ
* master
T1
F1
F2
83fb
test.txt
94b8
favorites
6cc4
test.txt
T2
T3
F3
Data Structure
1db7
test.txt
Commit 1 Commit 2
parent
refs/heads/test-branch refs/heads/master .git/HEAD
d0ef
tree
3266
tree
ded1
commit
1fa2
commit
Other references in Git
tag

once created, it will never changeโ€จ
unless explicitly updated with --forceโ€จ
useful for marking speci๏ฌc versionsโ€จ
Letโ€™s talk porcelain.
Git Porcelain Commands
commit/push/pull/merge/โ€ฆ
โ€ข build upon plumbing commands
diff
$ git diff HEAD
# equivalent ofโ€ฆ
$ git ls-files -m
cherry
$ git cherry master origin/master
# equivalent ofโ€ฆ
$ git rev-parse master..origin/master
status
$ git status
# equivalent ofโ€ฆ
$ git ls-files --exclude-per-directory=.gitignore
โ€”exclude-from=.git/info/exclude โ€”others --modified
-t
commit
$ git update-index --add
F1
$ git update-index --add
$ echo "commit-msg" | โ€จ
git commit-tree
[SHA-1]
commit
T1
F1
Commit 1
$ git update-index --add
$ echo "commit-msg" | โ€จ
git commit-tree
[SHA-1]
$ git write-tree
commit
T1
F1
Commit 1
$ git update-index --add
$ echo "commit-msg" | โ€จ
git commit-tree
[SHA-1]
$ git write-tree
$ git update-refs refs/
heads/master
T1
F1
Commit 1
refs/heads/master
commit
Commits in DAG
Commit 1 CommitCommit
Blob/File info
Tree info
Create a New File (File 3)
Commit 1
Create a New File (File 3)
Commit 1
Create a New File (File 3)
Commit 1
Commit a New File (File 3)
Commit 1 Commit 2
Edit and Commit File1
Commit 1 Commit 2
Edit and Commit File1
Commit 1 Commit 2
Edit and Commit File1
Commit 1 Commit 2
Edit and Commit File1
Commit 1 Commit 2 Commit 3
merge
merge is a commit with N parents,
retaining merge history
$ git merge
$ git merge โ€”-squash
Basic Merge
$ git status
On branch master
You have unmerged paths.
(fix conflicts and run "git commit")
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: index.html
no changes added to commit (use "git add" and/or "git commit -a")
Basic Merge Con๏ฌ‚icts
<<<<<<< HEAD
<div id="footer">contact : email.support@github.com</div>
=======
<div id="footer">
please contact us at support@github.com
</div>
>>>>>>> some-remote-branch
<<<<<<< HEAD
(local) HEAD content is here
=======
some-remote-branch content is here
>>>>>>> some-remote-branch
Basic Merge Con๏ฌ‚icts
$ git mergetoolโ€จ
This message is displayed because 'merge.tool' is not configured.
See 'git mergetool --tool-help' or 'git help config' for more
details.
'git mergetool' will now attempt to use one of the following tools:
opendiff kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse
diffmerge ecmerge p4merge araxis bc3 codecompare vimdiff emerge
Merging:
index.html
Normal merge conflict for 'index.html':
{local}: modified file
{remote}: modified file
Hit return to start merge resolution tool (opendiff):
Basic Merge Con๏ฌ‚icts
$ git merge โ€”-abort
Aborting Merge
$ git merge โ€”s ours
$ git merge โ€”s theirs
Merge with Strategy
pull
โ€ข fetch + merge

โ€ข con๏ฌ‚ict is possible

$ git pull origin/master
# equivalent of โ€ฆ
$ git fetch origin/masterโ€จ
$ git merge origin/master
pull
โ€ข fetch + merge

โ€ข con๏ฌ‚ict is possible

$ git pull
fetch
$ cat .git/config | grep remoteโ€จ
[remote "origin"]โ€จ
url = git://127.0.0.1/git/demo.gitโ€จ
fetch = +refs/heads/*:refs/remotes/origin/*โ€จ
โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€จ
source destination
rebase
replay commits one by one

on top of a branch
โ€ข fun

โ€ข dangerous

โ€ข use with caution, esp. working with others

โ€ข only use in local repositories/branches
Changing History isโ€ฆ
rebase
# equivalent to git pull โ€”rebaseโ€จ
$ git fetch origin/master; git rebase origin/master
A---B---C topic
/
D---E---F---G master
to:
A'--B'--C' topic
/
D---E---F---G master
rebase
$ git rebase -i
$ git rebase --onto
โ€ข replays commits

โ€ข moves commits

โ€ข changes commit history

โ€ข changes commit parent/ancestor
rebase
Branches in Git
โ€ข just like parallel universes

โ€ข nothing more than references to
commit
# list local branches
$ git branch
# list local and remote branches
$ git branch -a
# show branches with reference
$ git branch -v
# show branch tracking info
$ git branch -vv
List all Branches
$ git remote -vv
$ git remote set-url http://example.com/foo.git
$ git remote add staging git://git.kernel.org/.../gregkh/staging.git
# or just edit .git/info
Setting Tracking Info
Caret and Tilde
โ€ข caret(~n): depth-๏ฌrst n-th parent
commit

โ€ข tilde(^n): breadth-๏ฌrst n-th
parent commit

โ€ข See

$ git help rev-parse
Revision Selection
G H I J
 /  /
D E F
 | / 
 | / |
|/ |
B C
 /
 /
A
A = = A^0
B = A^ = A^1 = A~1
C = A^2 = A^2
D = A^^ = A^1^1 = A~2
E = B^2 = A^^2
F = B^3 = A^^3
G = A^^^ = A^1^1^1 = A~3
H = D^2 = B^^2 = A^^^2 = A~2^2
I = F^ = B^3^ = A^^3^
J = F^2 = B^3^2 = A^^3^2
push.default
nothing
do not push anything (error out) unless a refspec is explicitly given. This is primarily meant for people
who want to avoid mistakes by always being explicit.

current
push the current branch to update a branch with the same name on the receiving end. Works in both
central and non-central work๏ฌ‚ows.

upstream
push the current branch back to the branch whose changes are usually integrated into the current
branch (which is called @{upstream}). This mode only makes sense if you are pushing to the same
repository you would normally pull from (i.e. central work๏ฌ‚ow).

simple
in centralized work๏ฌ‚ow, work like upstream with an added safety to refuse to push if the upstream
branch's name is di๏ฌ€erent from the local one. When pushing to a remote that is di๏ฌ€erent from the
remote you normally pull from, work as current.

This is the safest option and is suited for beginners.
Cheat Sheet
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
stash save
stash apply
stash pop
stash list
stash show
stash drop
stash clear
stash branch
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
status
diff
diff [commit or branch]
add
rm
mv
commit -a
reset โ€”hard
checkout
merge
rebase
cherry-pick
revert
clone
pull
clean
stash pop
stash save
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
reset HEAD
reset โ€”soft
diff โ€”cached
commit
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
log
branch
fetch
push
push โ€”delete
stash working
area
staging
area
local
repository
upstream
repository
stash working
area
staging
area
local
repository
upstream
repository
branch -r
Find Stuff in Git
Find Stuff byโ€ฆ
# find file by contentโ€จ
$ git grep
# find file by its nameโ€จ
$ git ls-file | grep
# find changes by line numberโ€จ
$ git blame -L
Find Stuff in log
# find changes by commit messageโ€จ
$ git log | grep
# find changes with specific stringโ€จ
$ git log -S
# find changes by file nameโ€จ
$ git log -p
# find changes by author/committerโ€จ
$ git log --authorโ€จ
$ git log --committer
#find changes within given time spanโ€จ
$ git --sinceโ€จ
$ git --until
More about log
# ignore mergesโ€จ
$ git log --no-merges
# customize how log looksโ€จ
$ git log --graph
$ git log --online
$ git log --pretty="โ€ฆ"
$ git log --stat
Undo & Cleanup in Git
Change Last Commit
$ git commit โ€”-amend
$ git commit โ€”-amend --no-edit
$ git commit ; git rebase -i HEAD~2
Unstage Staged Files
$ git reset HEAD [filename]
$ git reset .
Undo Working Modi๏ฌcations
$ git checkout -- [filename]
$ git checkout .
$ git stash
$ git stash drop
Cleanup Untracked Files
$ git clean -df
$ git add .
$ git stash
$ git stash drop
Delete Remote Branch
# check for proper remote branch nameโ€จ
$ git branch -a
$ git push origin โ€”-delete [branch_name]
$ git push origin :[branch_name]
# โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” Explanation โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” #โ€จ
$ cat .git/config | grep remoteโ€จ
[remote "origin"]โ€จ
url = git://127.0.0.1/git/demo.gitโ€จ
fetch = +refs/heads/*:refs/remotes/origin/*โ€จ
โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€จ
source destination
# pushing empty source/reference to destination
Be the Last Committer in a Branch
# use with cautionโ€จ
$ git commit --allow-empty
Basic Recoveries in Git
Recover Deleted Branch
$ git branch -d test-branchโ€จ
Deleted branch test-branch (was 1fa215b).
$ git checkout 1fa215bโ€จ
HEAD is now at 1fa215b... test commit
$ git co -b test-branch
โ€ข Do it before garbage collection
Reset Indices
$ git reset --softโ€จ
Does not touch the index ๏ฌle or the working tree at all (but resets the head
to <commit>, just like all modes do). This leaves all your changed ๏ฌles
"Changes to be committed", as git status would put it.
$ git reset --mixedโ€จ
Resets the index but not the working tree (i.e., the changed ๏ฌles are
preserved but not marked for commit) and reports what has not been
updated.โ€จ
This is the default action.
$ git reset --hardโ€จ
Resets the index and working tree. Any changes to tracked ๏ฌles in the
working tree since <commit> are discarded.
Diagnose Problems
$ git reflogโ€จ
1fa215b HEAD@{0}: checkout: moving from 1fa215b to test-branchโ€จ
1fa215b HEAD@{1}: checkout: moving from master to 1fa215bโ€จ
ded15c0 HEAD@{2}:
โ€ฆ
Extending Git
Put git-[command] in your $PATH
# show differences between two branches, group by commit
$ git peach
ded15c0 another test commit (2 days ago) <Jingwei "John" Liu>
test.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Put git-[command] in your $PATH (cont)
#!/usr/bin/env bash
# Author: Jingwei Liu <liujingwei02@meituan.com>
# Last Modified: Mar 26 2014 05:52:42 PM
set -e
# show changed files in git cherry
if [[ -n $1 ]]; then
if [[ $1 =~ ^[0-9]*$ ]] ; then
upstream="HEAD~$1"
else
upstream=$1
fi
else
upstream="master"
fi
git cherry $upstream | awk '{print $2}' | xargs git show --stat --
pretty=format:'%Cred%h%Creset %Creset %s %Cgreen(%cr) %C(bold blue)<
%an>%Creset'
Otherโ€ฆ
โ€ข Hooks

โ€ข Aliases

โ€ข Con๏ฌg

โ€ข Submodule
References
โ€ข git-scm.com

โ€ข gitready.com

โ€ข ProGit

โ€ข Deep Darkside of Git (source of a large portion of slides)

โ€ข Just use it, and read git help [command]

http://xkcd.com/1296/
Thank you!
http://creativecommons.org/licenses/by-sa/3.0/
Ad

More Related Content

What's hot (20)

[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
Ji-Woong Choi
ย 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
ย 
Source control
Source controlSource control
Source control
Sachithra Gayan
ย 
LiquiBase
LiquiBaseLiquiBase
LiquiBase
Mike Willbanks
ย 
Considerations for Alert Design
Considerations for Alert DesignConsiderations for Alert Design
Considerations for Alert Design
John Allspaw
ย 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
DaeMyung Kang
ย 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
ย 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
Anwarul Islam
ย 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
ย 
Learning git
Learning gitLearning git
Learning git
Sid Anand
ย 
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฏผํƒœ ๊น€
ย 
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œGit ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
chandler0201
ย 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
ย 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / Github
Paige Bailey
ย 
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
Terry Cho
ย 
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œsvn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
Insub Lee
ย 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
ย 
Git
GitGit
Git
Mayank Patel
ย 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
SheilaJimenezMorejon
ย 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
ย 
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
[์˜คํ”ˆ์†Œ์Šค์ปจ์„คํŒ…]Subversion vs git - ์ฐธ์„ ์ˆ˜ ์—†๋Š” ๊ฐ„๋‹จํ•จ
Ji-Woong Choi
ย 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
David Paluy
ย 
Considerations for Alert Design
Considerations for Alert DesignConsiderations for Alert Design
Considerations for Alert Design
John Allspaw
ย 
Troubleshooting redis
Troubleshooting redisTroubleshooting redis
Troubleshooting redis
DaeMyung Kang
ย 
Git real slides
Git real slidesGit real slides
Git real slides
Lucas Couto
ย 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
Anwarul Islam
ย 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
ย 
Learning git
Learning gitLearning git
Learning git
Sid Anand
ย 
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฒ„์ „๊ด€๋ฆฌ๋ฅผ ๋“ค์–ด๋ณธ์  ์—†๋Š” ์‚ฌ๋žŒ๋“ค์„ ์œ„ํ•œ DVCS - Git
๋ฏผํƒœ ๊น€
ย 
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œGit ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
Git ์ž…๋ฌธ์ž๋ฅผ ์œ„ํ•œ ๊ฐ€์ด๋“œ
chandler0201
ย 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
Lee Hanxue
ย 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / Github
Paige Bailey
ย 
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
4. แ„ƒแ…ขแ„‹แ…ญแ†ผแ„…แ…ฃแ†ผ แ„‹แ…กแ„แ…ตแ„แ…ฆแ†จแ„Žแ…ง แ„‰แ…ฅแ†ฏแ„€แ…จ แ„‘แ…ขแ„แ…ฅแ†ซ
Terry Cho
ย 
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œsvn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
Insub Lee
ย 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
Anurag Upadhaya
ย 

Viewers also liked (6)

Git Submodules
Git SubmodulesGit Submodules
Git Submodules
Maciej Lasyk
ย 
realSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in MediarealSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in Media
Dalia Asterbadi
ย 
Regex lecture
Regex lectureRegex lecture
Regex lecture
Jun Shimizu
ย 
Slicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue PieSlicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue Pie
Sam Gellar
ย 
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
Fingra.ph
ย 
The beatles
The beatlesThe beatles
The beatles
Pamela0710
ย 
Git Submodules
Git SubmodulesGit Submodules
Git Submodules
Maciej Lasyk
ย 
realSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in MediarealSociable Social Prospecting & Increasing Earned Value in Media
realSociable Social Prospecting & Increasing Earned Value in Media
Dalia Asterbadi
ย 
Regex lecture
Regex lectureRegex lecture
Regex lecture
Jun Shimizu
ย 
Slicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue PieSlicing Up the Mobile Services Revenue Pie
Slicing Up the Mobile Services Revenue Pie
Sam Gellar
ย 
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
ํ•‘๊ทธ๋ž˜ํ”„(Fingra.ph) ๋ชจ๋ฐ”์ผ ๊ด‘๊ณ  ์ ์šฉ ์‚ฌ๋ก€
Fingra.ph
ย 
The beatles
The beatlesThe beatles
The beatles
Pamela0710
ย 
Ad

Similar to Git: An introduction of plumbing and porcelain commands (20)

GIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control SystemGIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
ย 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
Zeeshan Khan
ย 
Git basics
Git basicsGit basics
Git basics
Malihe Asemani
ย 
Gitlikeapro 2019
Gitlikeapro 2019Gitlikeapro 2019
Gitlikeapro 2019
Jesรบs Miguel Benito Calzada
ย 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
ย 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
ย 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
Bioinformatics and Computational Biosciences Branch
ย 
sample.pptx
sample.pptxsample.pptx
sample.pptx
UshaSuray
ย 
Git_new.pptx
Git_new.pptxGit_new.pptx
Git_new.pptx
BruceLee275640
ย 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
ย 
Git 101
Git 101Git 101
Git 101
jayrparro
ย 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
Cristian Lucchesi
ย 
git.pptx
git.pptxgit.pptx
git.pptx
YoussefBaoussous1
ย 
Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
dropsolid
ย 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
ย 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
HELLOWorld889594
ย 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to Git
Muhil Vannan
ย 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
azwildcat
ย 
Design Systems + Git = Success - Clarity Conference 2018
Design Systems + Git  = Success - Clarity Conference 2018Design Systems + Git  = Success - Clarity Conference 2018
Design Systems + Git = Success - Clarity Conference 2018
Katie Sylor-Miller
ย 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
BigBlueHat
ย 
GIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control SystemGIT: Content-addressable filesystem and Version Control System
GIT: Content-addressable filesystem and Version Control System
Tommaso Visconti
ย 
Version control with GIT
Version control with GITVersion control with GIT
Version control with GIT
Zeeshan Khan
ย 
390a gitintro 12au
390a gitintro 12au390a gitintro 12au
390a gitintro 12au
Nguyen Van Hung
ย 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
Max Claus Nunes
ย 
sample.pptx
sample.pptxsample.pptx
sample.pptx
UshaSuray
ย 
Git 101
Git 101Git 101
Git 101
jayrparro
ย 
Git session Dropsolid.com
Git session Dropsolid.comGit session Dropsolid.com
Git session Dropsolid.com
dropsolid
ย 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
Venkat Malladi
ย 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
HELLOWorld889594
ย 
An introduction to Git
An introduction to GitAn introduction to Git
An introduction to Git
Muhil Vannan
ย 
git-and-bitbucket
git-and-bitbucketgit-and-bitbucket
git-and-bitbucket
azwildcat
ย 
Design Systems + Git = Success - Clarity Conference 2018
Design Systems + Git  = Success - Clarity Conference 2018Design Systems + Git  = Success - Clarity Conference 2018
Design Systems + Git = Success - Clarity Conference 2018
Katie Sylor-Miller
ย 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
BigBlueHat
ย 
Ad

Recently uploaded (20)

What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
ย 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your UsersAutomation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Lynda Kane
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
ย 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
ย 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
ย 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
ย 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
ย 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your UsersAutomation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Lynda Kane
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
ย 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
ย 
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy ConsumptionDrupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Drupalcamp Finland โ€“ Measuring Front-end Energy Consumption
Exove
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
ย 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
ย 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
ย 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
ย 
"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko"Rebranding for Growth", Anna Velykoivanenko
"Rebranding for Growth", Anna Velykoivanenko
Fwdays
ย 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 

Git: An introduction of plumbing and porcelain commands

  • 4. Quick Poll How many of you have use Git? SVN? git rebase?
  • 5. Letโ€™s look at git from another perspective.
  • 7. โ€ข distributed version control โ€ข working/staging area โ€ข how it works
  • 9. Version Control System โ€ข storing content โ€ข tracking changes to the content โ€ข distributing the content โ€ข keep accurate yet human-readable history
  • 10. VCS: Types and choices โ€ข No remote repository โ€ข Central repository โ€ข Distributed (with remote) repository
  • 11. Brutal Force VCS โ€ข Been there, done that. โ€ข Really not very informative โ€ข Which version to use? essay.doc essay_2.doc essay3.doc essay_final.doc essay_final2.doc eassay_final3.doc esassy_finalfinal.doc esassy_finalfinal2.doc
  • 13. VCS Design Centralized model all changes to the repository must transact via one speci๏ฌc repository for it to be recorded in history at all. Distributed model where there will often be publicly accessible repositories for collaborators to "push" to, but commits can be made locally and pushed to these public nodes later, allowing o๏ฌ„ine work.
  • 14. Centralized model Repository Working CopyWorking Copy checkout update log diff commit
  • 15. Distributed Model Remote Repository pull push commit commit checkoutcheckout Working Copy Working Copy log diff Local Repositories
  • 16. Centralized vs. Distributed โ€ข Delta-based changeset (linear history) โ€ข Directed Acyclic Graphs (DAG) representation
  • 17. Distributed VCS โ€ข distributed work๏ฌ‚ows โ€ข safeguard against data corruption โ€ข (reasonably) high performance โ€ข collaborators could work o๏ฌ„ine โ€ข collaborators could determine when their work are ready to share
  • 19. Git Commands: Plumbing and Porcelain plumbingโ€จ plumbing consists of low-level commands that enable basic content tracking and the manipulation of directed acyclic graphs (DAG) porcelainโ€จ smaller subset of git commands that most Git end users are likely to need to use for maintaining repositories and communicating between repositories for collaboration
  • 20. Low Level Commands (Plumbing) cat-file, commit-tree, count-objects, diff-index, for- each-ref, hash-object, merge-base, read-tree, rev- list, rev-parse, show-ref, symbolic-ref, update-index, update-ref, verify-pack, write-tree
  • 21. High Level Commands (Porcelain) commit/push/pull/merge/โ€ฆ โ€ข meant to be readable by human โ€ข not meant to be parsed โ€ข susceptible to changes/evolutions
  • 22. Describing Changeset with Hash Value Pros โ€ข Same content never duplicate Cons โ€ข Managing multiple ๏ฌles? โ€ข Managing history? โ€ข Hard to understand hash values
  • 24. Git Vernaculars blob stores ๏ฌle content. tree stores directory layouts and ๏ฌlenames. commit stores commit info and forms the Git commit graph. tag stores annotated tag
  • 25. Git: A Quick Glance โ€ข Content address-able database โ€ข Key is SHA-1 hash of objectโ€™s content โ€ข Value is the content โ€ข Same content never duplicate
  • 26. Setup $ git init demo; cd demoโ€จ Initialized empty Git repository in demo/.git/ # monitoring .git folderโ€จ # if you are using bash, thenโ€ฆโ€จ $ while :; do tree .git; sleep 2; done
  • 27. object in Git Same content never duplicate
  • 28. Parsing Object $ echo "test content" | git hash-object -w --stdinโ€จ d670460b4b4aece5915caf5c68d12f560a9fe3e4 $ find .git/objects/ -type fโ€จ .git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4 $ git cat-file -p d670โ€จ test content $ git cat-file -t d670โ€จ blob
  • 29. hash-object in Git content = "test content" header = "blob %d0", length_of(content) store = header + content sha1 = sha1_of(store) dir = ".git/objects/" + sha1[0:2] + "/" ๏ฌlename = sha1[2:] write(dir + ๏ฌlename, store) # Save compressed header + content
  • 30. hash-object in Git $ echo "Simon" > test.txt $ git hash-object -w test.txtโ€จ 83fba84900292b2feb7e955c72eda04a1faa1273 $ echo "Garfunkel" > test.txt $ git hash-object -w test.txtโ€จ 6cc4930db0f5ccd17f0bc7bfe0ae850b1b0c06a2 $ git cat-file -p 83fbโ€จ Simon cat test.txtโ€จ Garfunkel
  • 31. tree Object โ€ข point to other objects (hashed) with name โ€ข a root tree Object is a snapshot
  • 32. tree Object $ mkdir favorites; echo "fantastic" > favorites/band $ git update-index --add test.txt favorites/band $ git write-treeโ€จ d0ef546493e53c3beb98e5da4f437e581ff3c7e0 $ git cat-file -p d0efโ€จ 040000 tree 94b88a81db61ed617621138bc172aa6f3a408545 favoritesโ€จ 100644 blob 6cc4930db0f5ccd17f0bc7bfe0ae850b1b0c06a2 test.txt $ git cat-file -p 94b8โ€จ 100644 blob 744c44c7d1ffb9be8db8cd9f1e2c47830ca6f10b band
  • 34. tree Object $ echo "Byrds" > test.txt $ git update-index --add test.txt $ git write-treeโ€จ 3266237ac900a5f09c266b7d6bc79bde6a2386df $ git cat-file -p 3266โ€จ 040000 tree 94b88a81db61ed617621138bc172aa6f3a408545 favoritesโ€จ 100644 blob 1db792a2c726b393332a882fe105bc3ade4ddb66 test.txt $ git cat-file -p 1db7โ€จ Byrds
  • 36. commit Object โ€ข explain a change: who/when/why โ€ข point to a tree object with above info โ€ข pointer, not delta
  • 37. commit Object $ echo "test commit" | git commit-tree d0efโ€จ 1fa215b14c27f2739515eb8410f06478eb0c423e $ git cat-file -p 1fa2โ€จ tree d0ef546493e53c3beb98e5da4f437e581ff3c7e0โ€จ author Jingwei "John" Liu <[email protected]> 1407123580 +0800โ€จ committer Jingwei "John" Liu <[email protected]> 1407123580 +0800โ€จ โ€จ test commit
  • 39. commit Object $ echo "another test commit" | git commit-tree 3266 -p 1fa2โ€จ ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf $ git cat-file -p ded1โ€จ tree 3266237ac900a5f09c266b7d6bc79bde6a2386dfโ€จ parent 1fa215b14c27f2739515eb8410f06478eb0c423eโ€จ author Jingwei "John" Liu <[email protected]> 1407123885 +0800โ€จ committer Jingwei "John" Liu <[email protected]> 1407123885 +0800โ€จ โ€จ another test commit
  • 40. commit Object Anatomy $ echo "another test commit" | git commit-tree 3266 -p 1fa2โ€จ ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf $ git cat-file -p ded1โ€จ tree [SHA-1]โ€จ parent [SHA-1]โ€จ author [name] [email] [timestamp] [timezone]โ€จ committer [name] [email] [timestamp] [timezone]โ€จ โ€จ [commit message]
  • 41. T1 F1 F2 6cc4 test.txt 94b8 favorites 6cc4 band T2 T3 F3 Data Structure 1db7 test.txt Commit 1 Commit 2 parent d0ef tree 3266 tree 1fa2 commit ded1 commit
  • 42. commit Object โ€ข contains metadata about its ancestors โ€ข can have zero or many (theoretically unlimited) parent commits โ€ข initial commit has no parent โ€ข three-way merge commit has three parents
  • 43. reference in Git โ€ข stored in .git/refs โ€ข SHA-1
  • 44. reference in Git # create a branchโ€จ $ echo "1fa215b14c27f2739515eb8410f06478eb0c423e" > .git/refs/heads/test-branch $ git branchโ€จ * masterโ€จ test-branch $ git log --pretty=oneline test-branchโ€จ 1fa215b14c27f2739515eb8410f06478eb0c423e test commit $ find .git/refs/heads -type fโ€จ .git/refs/heads/masterโ€จ .git/refs/heads/test-branch
  • 45. reference in Git $ git update-refs refs/heads/master ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf $git log --pretty=oneline masterโ€จ ded15c0a38dcf226cfbc4838a9d78cd3f8d82baf another test commitโ€จ 1fa215b14c27f2739515eb8410f06478eb0c423e test commit $ cat .git/refs/heads/masterโ€จ ded15c0a38dcf226cfbc4838a9d78cd3f8d82bafโ€จ
  • 46. reference in Git $ cat .git/HEADโ€จ ref: refs/heads/master $ git branchโ€จ test-branchโ€จ * master $ git symbolic-ref HEAD refs/heads/test-branch $ cat .git/HEADโ€จ ref: refs/heads/test-branch
  • 47. T1 F1 F2 6cc4 test.txt 94b8 favorites 6cc4 band T2 T3 F3 Data Structure 1db7 test.txt Commit 1 Commit 2 parent refs/heads/test-branch refs/heads/master d0ef tree 3266 tree 1fa2 commit ded1 commit
  • 48. HEAD/head in Git โ€ข HEAD is symbolic references. It points to another reference โ€ข use ref, not SHA-1 $ cat .git/HEADโ€จ ref: refs/heads/master $ git branchโ€จ * master
  • 49. T1 F1 F2 83fb test.txt 94b8 favorites 6cc4 test.txt T2 T3 F3 Data Structure 1db7 test.txt Commit 1 Commit 2 parent refs/heads/test-branch refs/heads/master .git/HEAD d0ef tree 3266 tree ded1 commit 1fa2 commit
  • 50. Other references in Git tag once created, it will never changeโ€จ unless explicitly updated with --forceโ€จ useful for marking speci๏ฌc versionsโ€จ
  • 53. diff $ git diff HEAD # equivalent ofโ€ฆ $ git ls-files -m
  • 54. cherry $ git cherry master origin/master # equivalent ofโ€ฆ $ git rev-parse master..origin/master
  • 55. status $ git status # equivalent ofโ€ฆ $ git ls-files --exclude-per-directory=.gitignore โ€”exclude-from=.git/info/exclude โ€”others --modified -t
  • 57. $ git update-index --add $ echo "commit-msg" | โ€จ git commit-tree [SHA-1] commit T1 F1 Commit 1
  • 58. $ git update-index --add $ echo "commit-msg" | โ€จ git commit-tree [SHA-1] $ git write-tree commit T1 F1 Commit 1
  • 59. $ git update-index --add $ echo "commit-msg" | โ€จ git commit-tree [SHA-1] $ git write-tree $ git update-refs refs/ heads/master T1 F1 Commit 1 refs/heads/master commit
  • 60. Commits in DAG Commit 1 CommitCommit Blob/File info Tree info
  • 61. Create a New File (File 3) Commit 1
  • 62. Create a New File (File 3) Commit 1
  • 63. Create a New File (File 3) Commit 1
  • 64. Commit a New File (File 3) Commit 1 Commit 2
  • 65. Edit and Commit File1 Commit 1 Commit 2
  • 66. Edit and Commit File1 Commit 1 Commit 2
  • 67. Edit and Commit File1 Commit 1 Commit 2
  • 68. Edit and Commit File1 Commit 1 Commit 2 Commit 3
  • 69. merge merge is a commit with N parents, retaining merge history
  • 70. $ git merge $ git merge โ€”-squash Basic Merge
  • 71. $ git status On branch master You have unmerged paths. (fix conflicts and run "git commit") Unmerged paths: (use "git add <file>..." to mark resolution) both modified: index.html no changes added to commit (use "git add" and/or "git commit -a") Basic Merge Con๏ฌ‚icts
  • 72. <<<<<<< HEAD <div id="footer">contact : [email protected]</div> ======= <div id="footer"> please contact us at [email protected] </div> >>>>>>> some-remote-branch <<<<<<< HEAD (local) HEAD content is here ======= some-remote-branch content is here >>>>>>> some-remote-branch Basic Merge Con๏ฌ‚icts
  • 73. $ git mergetoolโ€จ This message is displayed because 'merge.tool' is not configured. See 'git mergetool --tool-help' or 'git help config' for more details. 'git mergetool' will now attempt to use one of the following tools: opendiff kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse diffmerge ecmerge p4merge araxis bc3 codecompare vimdiff emerge Merging: index.html Normal merge conflict for 'index.html': {local}: modified file {remote}: modified file Hit return to start merge resolution tool (opendiff): Basic Merge Con๏ฌ‚icts
  • 74. $ git merge โ€”-abort Aborting Merge
  • 75. $ git merge โ€”s ours $ git merge โ€”s theirs Merge with Strategy
  • 76. pull โ€ข fetch + merge โ€ข con๏ฌ‚ict is possible $ git pull origin/master # equivalent of โ€ฆ $ git fetch origin/masterโ€จ $ git merge origin/master
  • 77. pull โ€ข fetch + merge โ€ข con๏ฌ‚ict is possible $ git pull
  • 78. fetch $ cat .git/config | grep remoteโ€จ [remote "origin"]โ€จ url = git://127.0.0.1/git/demo.gitโ€จ fetch = +refs/heads/*:refs/remotes/origin/*โ€จ โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€จ source destination
  • 79. rebase replay commits one by one on top of a branch
  • 80. โ€ข fun โ€ข dangerous โ€ข use with caution, esp. working with others โ€ข only use in local repositories/branches Changing History isโ€ฆ
  • 81. rebase # equivalent to git pull โ€”rebaseโ€จ $ git fetch origin/master; git rebase origin/master A---B---C topic / D---E---F---G master to: A'--B'--C' topic / D---E---F---G master
  • 82. rebase $ git rebase -i $ git rebase --onto
  • 83. โ€ข replays commits โ€ข moves commits โ€ข changes commit history โ€ข changes commit parent/ancestor rebase
  • 84. Branches in Git โ€ข just like parallel universes โ€ข nothing more than references to commit
  • 85. # list local branches $ git branch # list local and remote branches $ git branch -a # show branches with reference $ git branch -v # show branch tracking info $ git branch -vv List all Branches
  • 86. $ git remote -vv $ git remote set-url http://example.com/foo.git $ git remote add staging git://git.kernel.org/.../gregkh/staging.git # or just edit .git/info Setting Tracking Info
  • 87. Caret and Tilde โ€ข caret(~n): depth-๏ฌrst n-th parent commit โ€ข tilde(^n): breadth-๏ฌrst n-th parent commit โ€ข See $ git help rev-parse Revision Selection G H I J / / D E F | / | / | |/ | B C / / A A = = A^0 B = A^ = A^1 = A~1 C = A^2 = A^2 D = A^^ = A^1^1 = A~2 E = B^2 = A^^2 F = B^3 = A^^3 G = A^^^ = A^1^1^1 = A~3 H = D^2 = B^^2 = A^^^2 = A~2^2 I = F^ = B^3^ = A^^3^ J = F^2 = B^3^2 = A^^3^2
  • 88. push.default nothing do not push anything (error out) unless a refspec is explicitly given. This is primarily meant for people who want to avoid mistakes by always being explicit. current push the current branch to update a branch with the same name on the receiving end. Works in both central and non-central work๏ฌ‚ows. upstream push the current branch back to the branch whose changes are usually integrated into the current branch (which is called @{upstream}). This mode only makes sense if you are pushing to the same repository you would normally pull from (i.e. central work๏ฌ‚ow). simple in centralized work๏ฌ‚ow, work like upstream with an added safety to refuse to push if the upstream branch's name is di๏ฌ€erent from the local one. When pushing to a remote that is di๏ฌ€erent from the remote you normally pull from, work as current. This is the safest option and is suited for beginners.
  • 92. stash working area staging area local repository upstream repository stash save stash apply stash pop stash list stash show stash drop stash clear stash branch
  • 94. stash working area staging area local repository upstream repository status diff diff [commit or branch] add rm mv commit -a reset โ€”hard checkout merge rebase cherry-pick revert clone pull clean stash pop stash save
  • 102. Find Stuff byโ€ฆ # find file by contentโ€จ $ git grep # find file by its nameโ€จ $ git ls-file | grep # find changes by line numberโ€จ $ git blame -L
  • 103. Find Stuff in log # find changes by commit messageโ€จ $ git log | grep # find changes with specific stringโ€จ $ git log -S # find changes by file nameโ€จ $ git log -p # find changes by author/committerโ€จ $ git log --authorโ€จ $ git log --committer #find changes within given time spanโ€จ $ git --sinceโ€จ $ git --until
  • 104. More about log # ignore mergesโ€จ $ git log --no-merges # customize how log looksโ€จ $ git log --graph $ git log --online $ git log --pretty="โ€ฆ" $ git log --stat
  • 105. Undo & Cleanup in Git
  • 106. Change Last Commit $ git commit โ€”-amend $ git commit โ€”-amend --no-edit $ git commit ; git rebase -i HEAD~2
  • 107. Unstage Staged Files $ git reset HEAD [filename] $ git reset .
  • 108. Undo Working Modi๏ฌcations $ git checkout -- [filename] $ git checkout . $ git stash $ git stash drop
  • 109. Cleanup Untracked Files $ git clean -df $ git add . $ git stash $ git stash drop
  • 110. Delete Remote Branch # check for proper remote branch nameโ€จ $ git branch -a $ git push origin โ€”-delete [branch_name] $ git push origin :[branch_name] # โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” Explanation โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” #โ€จ $ cat .git/config | grep remoteโ€จ [remote "origin"]โ€จ url = git://127.0.0.1/git/demo.gitโ€จ fetch = +refs/heads/*:refs/remotes/origin/*โ€จ โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€จ source destination # pushing empty source/reference to destination
  • 111. Be the Last Committer in a Branch # use with cautionโ€จ $ git commit --allow-empty
  • 113. Recover Deleted Branch $ git branch -d test-branchโ€จ Deleted branch test-branch (was 1fa215b). $ git checkout 1fa215bโ€จ HEAD is now at 1fa215b... test commit $ git co -b test-branch โ€ข Do it before garbage collection
  • 114. Reset Indices $ git reset --softโ€จ Does not touch the index ๏ฌle or the working tree at all (but resets the head to <commit>, just like all modes do). This leaves all your changed ๏ฌles "Changes to be committed", as git status would put it. $ git reset --mixedโ€จ Resets the index but not the working tree (i.e., the changed ๏ฌles are preserved but not marked for commit) and reports what has not been updated.โ€จ This is the default action. $ git reset --hardโ€จ Resets the index and working tree. Any changes to tracked ๏ฌles in the working tree since <commit> are discarded.
  • 115. Diagnose Problems $ git reflogโ€จ 1fa215b HEAD@{0}: checkout: moving from 1fa215b to test-branchโ€จ 1fa215b HEAD@{1}: checkout: moving from master to 1fa215bโ€จ ded15c0 HEAD@{2}: โ€ฆ
  • 117. Put git-[command] in your $PATH # show differences between two branches, group by commit $ git peach ded15c0 another test commit (2 days ago) <Jingwei "John" Liu> test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
  • 118. Put git-[command] in your $PATH (cont) #!/usr/bin/env bash # Author: Jingwei Liu <[email protected]> # Last Modified: Mar 26 2014 05:52:42 PM set -e # show changed files in git cherry if [[ -n $1 ]]; then if [[ $1 =~ ^[0-9]*$ ]] ; then upstream="HEAD~$1" else upstream=$1 fi else upstream="master" fi git cherry $upstream | awk '{print $2}' | xargs git show --stat -- pretty=format:'%Cred%h%Creset %Creset %s %Cgreen(%cr) %C(bold blue)< %an>%Creset'
  • 119. Otherโ€ฆ โ€ข Hooks โ€ข Aliases โ€ข Con๏ฌg โ€ข Submodule
  • 120. References โ€ข git-scm.com โ€ข gitready.com โ€ข ProGit โ€ข Deep Darkside of Git (source of a large portion of slides) โ€ข Just use it, and read git help [command] http://xkcd.com/1296/