0% found this document useful (0 votes)
5 views

GitIntro+GettingGit+GitStartedwithGit 2ndPart

The document outlines the process of branching and merging in Git, including commands like 'git checkout', 'git merge', and 'git branch'. It explains the advantages of using branches such as experimentation and easier merging, and describes both fast-forward and non-fast-forward merges. The document also includes code snippets and examples related to managing branches and commits.

Uploaded by

makoma3772
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

GitIntro+GettingGit+GitStartedwithGit 2ndPart

The document outlines the process of branching and merging in Git, including commands like 'git checkout', 'git merge', and 'git branch'. It explains the advantages of using branches such as experimentation and easier merging, and describes both fast-forward and non-fast-forward merges. The document also includes code snippets and examples related to managing branches and commits.

Uploaded by

makoma3772
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 187

git checkout master

git merge GitIntro


git merge GettingGit
git merge GitStartedwithGit
Montserrat Sendín
Course 2024/25
(2nd Part)
Branching and Merging
branches
branches
lightweight, movable
pointers to a commit

branch

C1
branches

• Cheap and local

• Easy to switch

• Try out new ideas

• Merging is way smarter


branching
gi t br anch
gi t checkout
HEAD

master

Commit
98ca9

c3d README.txt
f13 hello.c

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
HEAD

master

Commit
98ca9

c3d README.txt
f13 hello.c

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
HEAD

master

Commit
98ca9

c3d README.txt
f13 hello.c

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
HEAD

master

Commit
98ca9

c3d README.txt
f13 hello.c

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
git branch i18n
HEAD

master

Commit
98ca9
98ca9

c3d README.txt
f13 hello.c

i18n

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
git branch i18n
HEAD

master

Commit
98ca9
98ca9

c3d README.txt
f13 hello.c

i18n

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
git branch
HEAD

master

Commit
98ca9
98ca9

c3d README.txt
f13 hello.c

i18n

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
git branch
HEAD

$ git branch
* master
master
i18n

Commit
98ca9
98ca9

c3d README.txt
f13 hello.c

i18n

#include<stdio.h>
This is Scott's
Hello project.
int main(void) {
printf("Hello\n");
Licensed under
return 0;
GPL.
}
$ f i nd . gi t / r ef s
. gi t / r ef s
. gi t / r ef s/ heads
. gi t / r ef s/ heads/ def aul t
. gi t / r ef s/ heads/ exper i ment
$ f i nd . gi t / r ef s
. gi t / r ef s
. gi t / r ef s/ heads
. gi t / r ef s/ heads/ mast er
. gi t / r ef s/ heads/ i 18n
$ f i nd . gi t / r ef s
. gi t / r ef s
. gi t / r ef s/ heads
. gi t / r ef s/ heads/ mast er
. gi t / r ef s/ heads/ i 18n

$ cat . gi t / r ef s/ heads/ mast er


98ca909dc9e38af 91565082bdf 93577f f 555489e
HEAD

master

98ca9

a23fe
i18n

HEAD
git checkout i18n
HEAD

master

98ca9

a23fe
i18n

HEAD
HEAD

master

98ca9

a23fe
i18n

HEAD
git commit
HEAD

master

98ca9

a23fe
i18n

HEAD
git commit
HEAD

master

98ca9

a23fe
i18n

HEAD
git commit

master

98ca9

a23fe

i18n

HEAD
master

98ca9

a23fe

i18n

HEAD
git commit

master

98ca9

a23fe

i18n

HEAD
git commit

master

98ca9

a23fe 3acd1

i18n

HEAD
master

98ca9

a23fe 3acd1

i18n

HEAD
git checkout -b iss53 master

master

98ca9

a23fe 3acd1

i18n

HEAD
git checkout -b iss53 master

master

98ca9

a23fe 3acd1

iss53

i18n
HEAD
git checkout master;
git checkout -b iss53

master

98ca9

a23fe 3acd1

iss53

i18n
HEAD
git checkout master;
git branch iss53;
git checkout iss53

master

98ca9

a23fe 3acd1

iss53

i18n
HEAD
git checkout -b iss53 master

master

98ca9

a23fe 3acd1

iss53

i18n
HEAD
master

98ca9

a23fe 3acd1

iss53

i18n
HEAD
git commit

HEAD

iss53

master

34ac2

98ca9

a23fe 3acd1

i18n
HEAD

iss53

master

34ac2

98ca9

a23fe 3acd1

i18n
git commit

HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

c3d README.txt c3d README.txt


34ac2
f13 hello.c
f30ab
f13 hello.c
43d issue.c 5ff issue.c

c3d98ca9
README.txt
f13 hello.c

c3da23fe
README.txt c3d README.txt
f13 hello.c 9ec3acd1
hello.c
d3a i18n.c 3a6 i18n.c

i18n
HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
merging
gi t mer ge
HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git checkout master

HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge iss53

HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge iss53

HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
fast-forward merge
git merge iss53

HEAD

iss53

master

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge iss53

HEAD

master iss53

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
HEAD

master iss53

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge i18n

HEAD

master iss53

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
non fast-forward merge
git merge i18n

HEAD

master iss53

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge i18n

HEAD

master iss53

34ac2 f30ab

98ca9

a23fe 3acd1

i18n
git merge i18n

HEAD

master iss53

c3d README.txt
34ac2 f13 f30ab
hello.c
5ff issue.c

c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
git merge i18n

HEAD

master iss53

c3d README.txt
34ac2 f13 f30ab
hello.c
5ff issue.c

c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
git merge i18n

HEAD

master iss53

c3d README.txt
34ac2 f13 f30ab
hello.c
5ff issue.c

c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
git merge i18n

HEAD

master iss53

c3d README.txt
34ac2 f13 f30ab
hello.c
5ff issue.c

c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
git merge i18n

HEAD

master iss53

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

c3d README.txt
c3d README.txt
9ec hello.c
34ac2 f13 f30ab
hello.c
5ff 95c41
issue.c
5ff issue.c
3a6 i18n.c
c3d README.txt
f13 98ca9
hello.c

c3d README.txt
a23fe 9ec 3acd1
hello.c
3a6 i18n.c

i18n
HEAD

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1

i18n
$ git commit
reintegration merges
HEAD

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1

i18n
git checkout i18n

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1

i18n

HEAD
git commit

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1 4fa23

i18n

HEAD
git checkout master

HEAD

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1 4fa23

i18n
git merge i18n

HEAD

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1 4fa23

i18n
git merge i18n

HEAD

iss53 master

34ac2 f30ab 95c41

98ca9

a23fe 3acd1 4fa23

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt
9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c
3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt
9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c
3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt
9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c
3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt
9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c
3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt 45d README.txt


9ec hello.c 9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c 67a2d
5ff issue.c
3a6 i18n.c 3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

c3d README.txt 45d README.txt


9ec hello.c 9ec hello.c
34ac2 f30ab 5ff 95c41
issue.c 67a2d
5ff issue.c
3a6 i18n.c 3a6 i18n.c

98ca9

c3d README.txt 45d README.txt


a23fe 9ec 3acd1
hello.c 9ec 4fa23
hello.c
3a6 i18n.c 3a6 i18n.c

i18n
git merge i18n

HEAD

iss53 master

34ac2 f30ab 95c41 67a2d

98ca9

a23fe 3acd1 4fa23

i18n
Why is this cool?
try out an idea
isolate work units
long running topics
long running topics
continuous merging
Deleting Branches
git branch -d branch
git branch –d iss53
git branch –d iss53
git branch –d iss53
git branch –d iss53
git branch –d i18n

---
git branch –d iss53
git branch –d i18n
git branch –D i18n
git branch –D i18n
--delete --force
using a branch
git checkout -b feature2 create new branch

git commit save some work

git checkout master switch back

git merge feature2 work is merged in

git rebase feature2 work played on top

git branch -d feature2 delete branch


https://marklodato.github.io/visual-git-guide/index-en.html#rebase
rebasing vs merging
initial state
initial state

merge experiment
initial state
initial state

rebase master
warning!

• Rebasing is rewriting history


• BAD for pushed commits
• Keep the repo in fast-forward
• (This doesn’t mean rebase is bad!)
Collaborating
https://github.com/user/repo.git
https://github.com/user/repo.git

After a while, you decide to publish changes to the remote....


bringing down code

git fetch remote: get updates

git pull remote branch:

• get updates from remote for branch


• merge/rebase it into your current branch
git pull <remote-name> <local-branch-name>
git push <remote-name> <local-branch-name>
git fetch <remote-name> <local-branch-name>
git merge <remote-name>
Tagging
v0.1 v1.3
$ git tag –a v1.3 –m “my version 1.3”
$ git tag
v0.1
v1.3
Looking Around
gi t l og
walking your commit
history
HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
git log

HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
git log

HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
git log

HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
git log

HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
git log

HEAD

iss53 master

34ac2
4db9f f30ab
5eea9 95c41
16758

98ca9
79c2a

a23fe
1d638 3acd1
4b2a7 4fa23
faf4e

i18n
$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


$ git log
commit 16758d868a4e97c9d4281940438b7ea1680cfc0a
Merge: 5eea9cf 4b2a7ae
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:29:23 2010 -0700

Merge branch 'i18n'


HEAD
commit 4b2a7ae83bcbb213c7d88c6fada3700f77d43a2e
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:28:45 2010 -0700 iss53 master

fix spacing issues in both c files


4db9f 5eea9 16758
commit 1d6389c30cf766daf3dcfe7cc1e3b7fdbfc5cc48
Author: Scott Chacon <[email protected]> 79c2a
Date: Wed Jul 28 16:28:18 2010 -0700
1d638 4b2a7 faf4e
added i18n file

i18n
commit 5eea9cf450d5b200d7f134e4024d1c062cb5b341
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:35 2010 -0700

documented issue file

commit 4db9f5c2b4c3935ff787f0fa85e9265c3e306fca
Author: Scott Chacon <[email protected]>
Date: Wed Jul 28 16:27:10 2010 -0700

added issue file


log formatting
git log --oneline
HEAD

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline
16758d8 Merge branch 'i18n'
4b2a7ae fix spacing issues in both c files
1d6389c added i18n file
5eea9cf documented issue file
4db9f5c added issue file
79c2add initial project import
HEAD

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline iss53
5eea9cf documented issue file
4db9f5c added issue file
79c2add initial project import

HEAD

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline i18n
faf4ece update README to be more specific
4b2a7ae fix spacing issues in both c files
1d6389c added i18n file
79c2add initial project import

HEAD

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
git log --graph
$ git log --oneline
16758d8 Merge branch 'i18n'
4b2a7ae fix spacing issues in both c files
1d6389c added i18n file
5eea9cf documented issue file
4db9f5c added issue file
79c2add initial project import
HEAD

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph
* 16758d8 Merge branch 'i18n'
|\
| * 4b2a7ae fix spacing issues in both c files
| * 1d6389c added i18n file
* | 5eea9cf documented issue file
* | 4db9f5c added issue file
|/ HEAD
* 79c2add initial project import

iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
git log --all

git log --decorate


$ git log --oneline --graph --all --decorate
* faf4ece (i18n) update README to be more specific
| * 16758d8 (HEAD, master) Merge branch 'i18n'
| |\
| |/
|/|
* | 4b2a7ae fix spacing issues in both c files
* | 1d6389c added i18n file
| * 5eea9cf (iss53) documented issue file
| * 4db9f5c added issue file HEAD
|/
* 79c2add initial project import
iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
$ git log --oneline --graph --all --decorate
* faf4ece (i18n) update README to be more specific
| * 16758d8 (HEAD, master) Merge branch 'i18n'
| |\
| |/
|/|
* | 4b2a7ae fix spacing issues in both c files
* | 1d6389c added i18n file
| * 5eea9cf (iss53) documented issue file
| * 4db9f5c added issue file HEAD
|/
* 79c2add initial project import
iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
git config --global
alias.lol “log --oneline --graph --decorate”
git config --global
alias.lol “log --oneline --graph --decorate”

git lol
git config --global
alias.lol “log --oneline --graph --decorate”

git lol
$ git lol --all
* faf4ece (i18n) update README to be more specific
| * 16758d8 (HEAD, master) Merge branch 'i18n'
| |\
| |/
|/|
* | 4b2a7ae fix spacing issues in both c files
* | 1d6389c added i18n file
| * 5eea9cf (iss53) documented issue file
| * 4db9f5c added issue file HEAD
|/
* 79c2add initial project import
iss53 master

4db9f 5eea9 16758

79c2a

1d638 4b2a7 faf4e

i18n
Review
Review
git init
Review
git init

git clone
Review
git init

git clone

git add
Review
git init

git clone

git add

git status
Review
git init

git clone

git add

git status

git commit
Review
git init

git clone

git add

git status

git commit

git branch
Review
git init git checkout

git clone

git add

git status

git commit

git branch
Review
git init git checkout

git clone git merge

git add

git status

git commit

git branch
Review
git init git checkout

git clone git merge

git add git push

git status

git commit

git branch
Review
git init git checkout

git clone git merge

git add git push

git status git fetch

git commit

git branch
Review
git init git checkout

git clone git merge

git add git push

git status git fetch

git commit git pull

git branch
Review
git init git checkout

git clone git merge

git add git push

git status git fetch

git commit git pull

git branch git log


Review
git init git checkout

12
git clone git merge

git add git push

git status git fetch

git commit git pull

git branch git log


Resources

git-scm.com
gitref.org
progit.com
[email protected]

You might also like