Professional Documents
Culture Documents
What Is Git?: Paparao.C
What Is Git?: Paparao.C
GIT
PAPARAO.C
WHAT IS GIT?
Started in 2005
Created by Linus Torvald to aid in Linux kernel development
Distributed version control
Users keep entire code and history on their location machines
Users can make any changes without internet access
(Except pushing and pulling changes from a remote server)
Git is optimized for:
• Distributed development
• Large file counts
• Complex merges
• Making trial branches
• Being very fast
• Being robust
OTHER SCM
1
17-05-2021
2
17-05-2021
3
17-05-2021
INSTALL GIT
Linux (Debian)
Command: sudo apt-get install git!
Linux (Fedora)
- Command: sudo yum install git!
Mac
- http://git-scm.com/download/mac
Windows
- http://git-scm.com/download/win
10
www.github.com
Free for public repositories
11
Snapshots
Commit
Repositories
Branches
Merging
12
4
17-05-2021
13
14
15
5
17-05-2021
16
17
18
6
17-05-2021
The process of downloading commits that don’t exist on your machine from a remote repository is called pulling
changes
The process of adding your local changes to the remote repository is called pushing changes
19
20
21
7
17-05-2021
22
23
24
8
17-05-2021
25
26
27
9
17-05-2021
28
29
30
10
17-05-2021
31
32
33
11
17-05-2021
34
35
36
12
17-05-2021
37
38
39
13
17-05-2021
40
41
42
14
17-05-2021
43
44
45
15
17-05-2021
46
47
48
16
17-05-2021
49
50
51
17
17-05-2021
52
53
54
18
17-05-2021
55
56
57
19
17-05-2021
58
59
60
20
17-05-2021
WHAT IS MASTER?
61
62
63
21
17-05-2021
64
65
66
22
17-05-2021
67
68
69
23
17-05-2021
70
71
72
24
17-05-2021
Once you’re done with your feature, you merge it back into master
73
74
75
25
17-05-2021
76
77
78
26
17-05-2021
79
80
81
27
17-05-2021
82
83
84
28
17-05-2021
85
MERGE COMMITS
86
MERGE SQUASH
87
29
17-05-2021
REBASE
88
WHAT IS GITHUB?
www.github.com
Largest web-based git repository hosting service
Aka, hosts ‘remote repositories’ • Allows for code collaboration with anyone online
Adds extra functionality on top of git
UI, documentation, bug tracking, feature requests, pull requests, and more!
Founded in 2008
Also has an Enterprise edition for businesses
89
GIT COMMANDS
90
30
17-05-2021
BASIC COMMANDS
git init
git clone
git log
git diff
git status
git add
git commit
91
GIT INIT
92
GIT CLONE
93
31
17-05-2021
GIT LOG
94
GIT ADD
Adds changes
95
GIT COMMIT
96
32
17-05-2021
GIT DIFF
97
GIT STATUS
Displays the file names that has been modified, added and untracked
98
99
33