0% found this document useful (0 votes)
25 views337 pages

Git

The document is a comprehensive guide to Git, aimed at helping users understand and utilize Git effectively. It covers various topics including Git objects, branches, and how to record changes, with practical examples and hands-on exercises. The book is publicly available and includes accompanying videos for enhanced learning.

Uploaded by

Joel Esparza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views337 pages

Git

The document is a comprehensive guide to Git, aimed at helping users understand and utilize Git effectively. It covers various topics including Git objects, branches, and how to record changes, with practical examples and hands-on exercises. The book is publicly available and includes accompanying videos for enhanced learning.

Uploaded by

Joel Esparza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 337

Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.

org/news/gitting-things-done-book/

Introduction

1 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

2 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Table of Contents

3 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Who Is This Book For?

Who Am I?

4 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

The Approach of This Book

5 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Why Is This Book Publicly


Available?

Accompanying Videos

Get Your Hands Dirty

6 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Git's Feelings

My Setup

Feedback Is Welcome

7 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Note

Part 1 - Main Objects and


Introducing Changes
Chapter 1 - Git Objects

Git as a System for Maintaining a File


System

8 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Blobs

Hashes

9 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Back to Git

10 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Trees

11 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Commits

12 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

13 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

14 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Considering Hashes

15 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How Are Objects Stored?

Short Recap - Git Objects

Chapter 2 - Branches in Git

16 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

17 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

18 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

19 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

20 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

21 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

22 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Short Recap - Branches

Chapter 3 - How to Record


Changes in Git

23 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

24 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

25 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

26 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

27 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Create a Repo — The Conventional


Way

28 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

29 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

30 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

31 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

32 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

33 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - How to Record Changes in Git

34 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 4 - How to Create a


Repo From Scratch

How to Set Up

35 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

36 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

37 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo "ref: refs/heads/main" > .git/HEAD

echo ref: refs/heads/main > .git\HEAD

38 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo "ref: refs/heads/main" > .git/HEAD

Plumbing vs Porcelain Commands in Git

39 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Create Objects in Git

echo "Git is awesome" | git hash-object --stdin

> echo Git is awesome | git hash-object --stdin

40 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

41 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

42 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

43 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git update-index --add --cacheinfo 100644 <blob-hash> <filename>

44 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo "Git is awesome" > awesome.txt

45 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

46 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git commit-tree <tree-hash> -m <commit message>

47 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

48 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

49 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - How to Create a Repo From


Scratch

50 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 5 - How to Work with


Branches in Git — Under the
Hood

51 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

52 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

53 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo 22267a945af8fde78b62ee7f705bbecfdd276b3d > .git/refs/heads/test

54 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

55 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - How to Work with Branches in Git


— Under the Hood

56 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Part 1 - Summary

57 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Part 2 - Branching and


Integrating Changes
Chapter 6 - Diffs and Patches

58 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Git Diff's History

Time to Get Hands-On

59 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

60 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff --no-index file.txt new_file.txt

61 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

62 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

63 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff --no-index new_file.txt file.txt

64 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

The Structure of a Diff

git diff --no-index file.txt new_file.txt

65 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

66 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

67 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

rm awesome.txt

git restore awesome.txt

68 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

69 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff --no-index example.py example_changed.py

70 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

71 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

72 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Produce Diffs

73 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout diffs

74 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

75 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

76 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

77 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add new_file.txt


git commit -m "Commit 3"

78 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

79 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

80 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

81 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git commit -m "Commit 4"

82 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff HEAD~1 HEAD

git diff HEAD HEAD~1

83 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

84 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show HEAD

git diff HEAD~ HEAD

85 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Apply Patches

Historical Note

86 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

A Simple Patch

git diff HEAD~1 HEAD

git diff HEAD~1 HEAD > my_patch.patch

git reset --hard HEAD~1

87 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

nano new_file.txt

nano my_patch.patch

88 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

This is a new file


With new content!

git apply my_patch.patch

nano new_file.txt

89 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Understanding the Context Lines

nano test.text

git add test.txt

git commit -m "Test file"

90 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff -- test.txt

91 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff -- test.txt > new_patch.patch

git reset --hard

92 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

93 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply new_patch.patch

git reset --hard

94 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply new_patch.patch

95 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply --verbose new_patch.patch

git apply -C1 new_patch.patch

96 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

97 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Like this one


And that one

How wonderful
So we are writing an example
Git is awesoome!

Recap - Git Diff and Patch

98 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 7 - Understanding Git


Merge

What is a Merge in Git?

99 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Time to Get Hands-on

100 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

101 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

102 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py

git commit -m "Commit 4"

103 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

104 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --hard HEAD~1

git checkout new_feature

105 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git merge new_feature --no-ff

106 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log -n1

107 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Time For a More Advanced Case

108 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout -b john_branch

git add lucy_in_the_sky_with_diamonds.md


git commit -m "Commit 5"

109 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main

git checkout -b paul_branch

git add penny_lane.md


git commit -m "Commit 6"

110 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git merge john_branch

111 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge paul_branch

git reset --hard HEAD~

112 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Perform a Three-way Merge in Git

113 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge-base main paul_branch

114 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff 4f90a62 4683aef

115 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff 4f90a62 4683aef > john_branch_diff.patch

git diff 4f90a62 c5e4951

116 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff 4f90a62 c5e4951 > paul_branch_diff.patch

git checkout 4f90a62

git apply --index john_branch_diff.patch

117 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply --index paul_branch_diff.patch

118 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git write-tree

git commit-tree <TREE_SHA> -p <COMMIT_5> -p <COMMIT_6> -m "Merge commit!"

git reset --hard db315a

119 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git reset --hard db315a

120 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Quick Recap of a Three-way Merge

121 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Moving on

git checkout main

122 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add a_day_in_the_life.md


git commit -m "Commit 7"

git checkout -b paul_branch_2

123 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add a_day_in_the_life.md


git commit -m "Commit 8"

124 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git checkout -b john_branch_2

125 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add a_day_in_the_life.md


git commit -m "Commit 9"

126 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge paul_branch_2

git merge-base john_branch_2 paul_branch_2

127 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main

git diff main paul_branch_2

128 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git diff main paul_branch_2 > paul_branch_2.patch
git apply --index paul_branch_2.patch

git diff main john_branch_2

129 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main john_branch_2 > john_branch_2.patch


git apply --index john_branch_2.patch

130 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git write-tree

131 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git commit-tree <TREE-ID> -p paul_branch_2 -p john_branch_2 -m "Merging new changes"

132 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout john_branch_2


git merge paul_branch_2

133 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --hard HEAD~

git apply --index paul_branch_2.patch

134 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

More Advanced Git Merge Cases

git checkout main


nano everyone.md

135 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add everyone.md


git commit -m "Commit 10"

git checkout -b paul_branch_3


nano everyone.md

136 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add everyone.md


git commit -m "Commit 11"

137 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main

138 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main > paul_3.patch

git checkout main

git checkout -b john_branch_3

git diff main

139 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main > john_3.patch

git add everyone.md


git commit -m "Commit 12"

140 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

141 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main paul_branch_3

142 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply paul_3.patch

143 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge-base john_branch_3 paul_branch_3

git diff main john_branch_3

144 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main john_branch_3 > john_3.patch

git checkout main


git apply john_3.patch

nano everyone.md

145 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

146 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply -v paul_3.branch

147 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply paul_3.patch

git reset --hard

git checkout paul_branch_3

148 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply john_3.patch

149 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply -v john_3.patch

150 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git apply -3 john_3.patch

151 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How Git's 3-way Merge Algorithm Works

git reset --hard

152 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

153 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

154 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

155 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

156 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

157 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

158 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge john_branch_3

159 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main

git merge paul_branch_3

160 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Resolve Merge Conflicts

161 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout -b paul_branch_4

git add everyone.md


git commit -m "Commit 13"

git add let_it_be.md


git commit -m "Commit 14"

162 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main

git checkout -b john_branch_4

163 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add everyone.md


git commit -m "Commit 15"

164 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add across_the_universe.md


git commit -m "Commit 16"

165 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff main paul_branch_4

166 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge paul_branch_4

167 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge-base john_branch_4 paul_branch_4

168 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git ls-files -s --abbrev

169 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git cat-file -p <BLOB_SHA_FOR_STAGE_2>

170 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show :<STAGE>:everyone.md

171 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

172 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff

173 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

174 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

nano everyone.md

175 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git diff --ours

git diff --theirs

git diff --base

git add everyone.md

176 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

177 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Use VS Code to Resolve Conflicts

git reset --hard HEAD~

git merge paul_branch_4

178 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

179 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

180 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

One More Powerful Tool

git reset --hard HEAD~

181 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git merge paul_branch_4

git log -p --merge

182 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

183 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

184 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - Understanding Git Merge

185 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Beatles-Related Resources

Chapter 8 - Understanding Git


Rebase

186 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Short Recap - What is Git Merge?

187 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

188 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How is Different than


?

189 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

as a Basis for Rebase

190 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show <SHA_OF_COMMIT_5>

191 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main (or git switch main)

git checkout -b my_branch (or git switch -c my_branch)

git cherry-pick <SHA_OF_COMMIT_5>

192 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

193 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

194 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git branch -D my_branch

Beyond - How to Use

195 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Time to Get Hands-On with Rebase

git checkout john_branch

git checkout paul_branch

196 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase john_branch

197 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

198 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git merge paul_branch

199 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Advanced Rebasing in Git

200 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --hard <ORIGINAL_COMMIT 4>

git checkout paul_branch


git reset --hard <ORIGINAL_COMMIT 9>

201 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

202 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show HEAD

git show HEAD~

203 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show HEAD~2

204 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase -i <SHA_OF_COMMIT_4>

205 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase -i main

206 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

207 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

208 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Use the Switch of

git checkout main

209 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git branch -D paul_branch


git branch -D john_branch

git checkout -b new_branch

210 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

nano code.py

git add code.py


git commit -m "Commit 10"

211 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main

git add code.py


git commit -m "Commit 11"

212 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 12"

213 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

214 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --onto <new_parent> <old_parent> <until>

git rebase --onto <SHA_OF_COMMIT_11> main new_branch

215 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout main


git checkout -b feature_branch_1

git branch -D new_branch

216 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add 1.py


git commit -m "Commit 13"

git checkout -b feature_branch_2

217 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add 2.py


git commit -m "Commit 14"

git add 2.py


git commit -m "Commit 15"

218 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout feature_branch_1

git add 1.py


git commit -m "Commit 16"

219 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

220 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout feature_branch_2

git rebase --onto main <SHA_OF_COMMIT_13>

git rebase --onto <new_parent> <old_parent>

221 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Rebase on a Single Branch

git add code.py


git commit -m "Commit 17"

222 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 18"

223 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 19"

224 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --interactive --onto <SHA_OF_COMMIT_15> <SHA_OF_COMMIT_15>

225 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

226 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

227 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

More Rebase Use Cases + More Practice

228 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How to Exclude Commits

git tag original_commit_f

229 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --onto <SHA_OF_COMMIT_B> <SHA_OF_COMMIT_D> HEAD

230 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --onto <SHA_OF_COMMIT_B> <SHA_OF_COMMIT_D>

231 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --onto <new_parent> <old_parent> <until>

How to Move Commits Across Branches

git checkout original_commit_f

232 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --onto <COMMIT_B> <COMMIT_D> <COMMIT_E>

233 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

A Note About Conflicts

git show main

234 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

```
This is a sample file

```
def new_feature():
print('new feature')

Zooming Out for the Big Picture

235 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

236 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

237 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - Understanding Git Rebase

Part 2 - Summary

238 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

239 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Part 3 - Undoing Changes

240 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 9 - Git Reset

A Short Reminder - Recording Changes

241 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Hands-on Demonstration

mkdir my_repo
cd my_repo
git init
echo Hello world > 1.txt

242 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add 1.txt

243 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git commit -m "Commit 1"

244 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo second file > 2.txt


git add 2.txt

git commit -m "Commit 2"

245 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Introducing

246 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --soft HEAD~1

247 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

248 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git commit -m "Commit 2.1"

249 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --mixed HEAD~1

250 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

251 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add 2.txt


git commit -m "Commit 2.2"

252 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --hard HEAD~1

253 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

254 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Real-Life Scenarios
Scenario #1

echo I love Git > love.txt


git add love.txt
git commit -m "Commit 2.3"

255 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git tag scenario-1

git reset --mixed HEAD~1

256 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo and Gitting Things Done >> love.txt

git add love.txt


git commit -m "Commit 2.4"

257 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Scenario #2

258 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo this is a new file > new.txt


git add new.txt
git commit -m "Commit 3"

259 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

260 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --soft HEAD~1

261 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git switch -c feature_branch

git commit -m "Commit 3.1"

262 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Scenario #3

echo Some changes >> love.txt


echo Git is cool > cool.txt
git add love.txt
git add cool.txt
git commit -m "Commit 4"

263 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --mixed HEAD~1

264 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add love.txt


git commit -m "Love"

git add cool.txt


git commit -m "Cool"

265 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Scenario #4

git checkout main


git reset --hard <SHA_OF_COMMIT_3_1>

266 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo Another file > another.txt


echo More love >> love.txt
git add another.txt
git add love.txt
git commit -m "Commit 4.1"

267 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

268 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout <SHA_OF_COMMIT_1>


git checkout -b existing
echo "Hello" > x.txt
git add x.txt
git commit -m "Commit X"
git checkout <SHA_OF_COMMIT_3_1> -- love.txt
git commit -m "Commit Y"
git checkout main

269 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git switch existing

git cherry-pick <SHA_OF_COMMIT_4_1>

270 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

271 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git switch main


git reset --hard HEAD~1

Recap - Git Reset

272 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 10 - Additional Tools for


Undoing Changes

273 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git checkout scenario-1

274 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo And I love this book >> love.txt

git add love.txt

git commit --amend -m "Commit 2.4"

275 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo This is more tezt >> love.txt


git add love.txt
git commit -m "Commit 3"

276 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git push origin HEAD

277 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

echo This is more text >> love.txt


git add love.txt
git commit -m "Commit 3.1"

278 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git revert HEAD~1

Git Rebase as a Tool for Undoing Things

279 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 17"

280 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 18"

281 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git add code.py


git commit -m "Commit 19"

282 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rebase --interactive --onto <SHA_OF_COMMIT_15> <SHA_OF_COMMIT_15>

283 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

284 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

285 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git reset --hard <SHA_OF_COMMIT_2_4>

echo lots of work >> love.txt


git add love.txt
git commit -m "Commit 3.2"

286 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

287 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

288 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

289 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git rev-parse "HEAD@{1}"

290 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

291 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Recap - Additional Tools for Undoing


Changes

292 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Chapter 11 - Exercises

293 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Exercise 1

Exercise (1a)

294 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Exercise (1b)

Exercise (1c)

Exercise (1d)

Exercise 2

295 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Exercise 3

296 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

297 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Exercise 4

git lol --branches="exercise_04*"

298 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Part 4 - Amazing and


Useful Git Tools

Chapter 12 - Git Log

299 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

300 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Filtering Commits

301 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Commits (Not) Reachable From...

git log branch_1 ^branch_2

302 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log feature_branch_1 ^main

303 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

By Author

git log --author="Name"

git log --author="John\|Jane"

304 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

By Date

git log --after="2023-04-12"

By Paths

git log --all -- 1.py

305 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log --all -- 1.py 2.py

git log -- *.py

git log -- **/*.py

By Commit Message

git log --grep="Commit 12"

306 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

By Diff Content

git log --all -S"Git is awesome"

git log --all -G"Git .* awesome"

Formatting Log

307 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

308 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

309 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log --oneline feature_branch_1 feature_branch_2

310 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

311 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log --oneline --graph feature_branch_1 feature_branch_2 --pretty=format:

312 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git log --oneline --graph feature_branch_1 feature_branch_2 --pretty=format:

313 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How is Structured?

git lol --all

314 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Setting an alias

git config --global alias.co checkout

git config --global alias.lol 'log --graph --pretty=format:'%Cred%h%Creset -%C

Chapter 13 - Git Bisect

315 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

How Does Work?

316 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Example

git log --oneline | tail -n 1

317 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git bisect start


git bisect good

318 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

319 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Automatic

320 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git bisect run my_script arguments

Chapter 14 - Other Useful


Commands

321 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

322 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git show <SHA_OF_COMMIT_5>

git checkout main (or git switch main)

git checkout -b my_branch (or git switch -c my_branch)

323 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

git cherry-pick <SHA_OF_COMMIT_5>

324 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

325 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

326 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

327 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

328 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

329 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Summary

330 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

331 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

A Message From Me to You

332 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Acknowledgements

If You Wish to Support This Book

333 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Contact Me

Appendixes
Additional References - By Part

Part 1

334 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Part 2
Diffs and Patches

Git Merge

Git Rebase

335 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

Beatles-Related Resources

Part 3

About the Author

336 of 337 1/19/2024, 4:20 PM


Gitting Things Done – A Visual and Practical Guide to Git [Full Book] https://www.freecodecamp.org/news/gitting-things-done-book/

337 of 337 1/19/2024, 4:20 PM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy