Chapter3 241107 213216
Chapter3 241107 213216
V1 V2
Master Release
branch
Branch Merge
out in
Develop
and test
1.1. About Version Control UNIT 01
1.1. About Version Control UNIT 01
v
1.2. Types of Version Control UNIT 01
Local Computer
File Version 3
Version 2
Version 1
1.2. Types of Version Control UNIT 01
File
Version Database
Version 3
Version 2
Computer B
Version 1
File
Server Computer
Version Database
Version 3
Version 2
Version 1
Computer A Computer B
File File
Version 2 Version 2
Version 1 Version 1
1.3. Benefits of Version Control UNIT 01
1.3. Benefits of Version Control UNIT 01
2.1. Git Overview UNIT 02
• When developing software, it is difficult to manage the latest version of the source code among team
members. For this reason, configuration management tool was created to solve the problems of version
control that occurs frequently in a project.
• One of these configuration management tools is Git, which was developed by Linus Torvalds in 2005 as a
version control system for the Linux kernel project.
v
2.1. Git Overview UNIT 02
2.2. Git & GitHub Installation UNIT 02
2.2. Git & GitHub Installation UNIT 02
2.2. Git & GitHub Installation UNIT 02
2.2. Git & GitHub Installation UNIT 02
Master
Main branch
(working environment that stores the final version)
2.2. Git & GitHub Installation UNIT 02
$ git --version
2.2. Git & GitHub Installation UNIT 02
clone
pull request
commit
Remote push
Repository
fork Remote Local File
Repository pull Repository
3.2. GitHub Terminologies UNIT 03
3.2. GitHub Terminologies UNIT 03
$ git init
$ git config
Ex
$ git status
3.2. GitHub Terminologies UNIT 03
$ git help
$ git add
$ git checkout
3.2. GitHub Terminologies UNIT 03
$ git merge
$ git push
$ git pull
$ git clone
$ git init + git remote add origin { URL } + git pull origin
main
3.2. GitHub Terminologies UNIT 03
Commit
https://paransilverlight.tistory.com/242
3.2. GitHub Terminologies UNIT 03
v
Edit the file
Stage the file
Commit
3.2. GitHub Terminologies UNIT 03
3.2. GitHub Terminologies UNIT 03
3.2. GitHub Terminologies UNIT 03
4.1. Simple GitHub Exercise UNIT
04
4.1. Simple GitHub Exercise UNIT
04
Create repository
Create repository
4.1. Simple GitHub Exercise UNIT
04
https://github.com/siciot/example.git
4.1. Simple GitHub Exercise UNIT
04
Help
Applications
4.1. Simple GitHub Exercise UNIT
04
New folder(N)
$ git init
https://github.com/siciot/example.git
4.1. Simple GitHub Exercise UNIT
04
4.1. Simple GitHub Exercise UNIT
04
$ git init
siciot
$ git add *
https://github.com/siciot/example.git
4.2. How to use GitHub when working alone UNIT
04
example1
4.2. How to use GitHub when working alone UNIT
04
4.2. How to use GitHub when working alone UNIT
04
pycharm Install
4.2. How to use GitHub when working alone UNIT
04
4.2. How to use GitHub when working alone UNIT
04
Save All
4.2. How to use GitHub when working alone UNIT
04
git add *
git commit –m “edit test.txt”
test.txt
$ git init
$ git add *
$ git commit
$ git push
4.2. How to use GitHub when working alone UNIT
04
$ git clone
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
Siciot/example1
C:\Users\dongh\GitHub\example1
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
test
-This text file will be edited!!!!
4.3. How to use GitHub through GUI environment UNIT
04
Push origin
↑ Last fetched 6 minutes ago 1↑
1 # example2
2
3 ## edited!
Commit changes
4.3. How to use GitHub through GUI environment UNIT
04
Fetch origin
Last fetched 8 minutes age
4.3. How to use GitHub through GUI environment UNIT
04
Push origin
↓ Last fetched just now 1↓
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
5 There is only
README.md 4 move to main branch
(No practice.py)
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
$ sudo rm /var/lib/apt/lists/lock
$ sudo rm /var/cache/apt/archives/lock
$ sudo rm /var/lib/dpkg/lock*
# Package Update
$ sudo dpkg --configure -a
$ sudo apt update
# Retry Install
$ sudo apt install github-desktop
4.3. How to use GitHub through GUI environment UNIT
04
4.3. How to use GitHub through GUI environment UNIT
04
Sign in to GitHub.com
Authorize desktop
4.3. How to use GitHub through GUI environment UNIT
04
GitHub Desktop
4.3. How to use GitHub through GUI environment UNIT
04
siciot/example1
Clone siciot/example1
4.3. How to use GitHub through GUI environment UNIT
04
1
2 New branch
1
2
\home \siciot2021\Documents/GitHub\example1
4.3. How to use GitHub through GUI environment UNIT
04
Publish branch
make practice.py
4.3. How to use GitHub through GUI environment UNIT
04
1 File 1 example1
2 Open 2 New
3 Python File
3 example1
4 OK
4.3. How to use GitHub through GUI environment UNIT
04
practice
Add
4.3. How to use GitHub through GUI environment UNIT
04
2 Add Configuration…
1 +
1 for i in range(4): 2 Python
Print(“*” * (i+1))
4.3. How to use GitHub through GUI environment UNIT
04
1 practice.py
2 OK
4.3. How to use GitHub through GUI environment UNIT
04
1 Script Path
console result
2 OK 3 Apply
4.3. How to use GitHub through GUI environment UNIT
04
$ cd {local path}
$ ls
practice.py README.md
practice.py
4.3. How to use GitHub through GUI environment UNIT
04
Push origin
1 Make practice.py
2 Commit to make-practice.py
Committed just now
make practice.py
4.3. How to use GitHub through GUI environment UNIT
04
$ ls
1 Current branch
2 main branch
4.3. How to use GitHub through GUI environment UNIT
04
5 There is only
README.md 4 move to main branch
(No practice.py)
4.3. How to use GitHub through GUI environment UNIT
04
5 There is only
README.md 4 move to main branch
(No practice.py)
4.3. How to use GitHub through GUI environment UNIT
04
1 Current branch
2 Recent branches
Switch branch
4.3. How to use GitHub through GUI environment UNIT
04
Confirm merge
4.3. How to use GitHub through GUI environment UNIT
04
Merged
Delete branch
4.3. How to use GitHub through GUI environment UNIT
04
View stash
4.3. How to use GitHub through GUI environment UNIT
04
Delete
Discard
4.3. How to use GitHub through GUI environment UNIT
04
$ ls
$ cat practice.py
4.3. How to use GitHub through GUI environment UNIT
04
5 There is only
README.md 4 move to main branch
(No practice.py)
5.1. Simple Practice UNIT 05
5.1. Simple Practice UNIT 05
Create repository
5.1. Simple Practice UNIT 05
1 File
2 Clone repository
Clone
5.1. Simple Practice UNIT 05
1 File
2 Open
1 Local path
2 OK
5.1. Simple Practice UNIT 05
1 mini_project
2 New
Python
3
File
5.1. Simple Practice UNIT 05
Main.py
Commit to main
5.1. Simple Practice UNIT 05
5.1. Simple Practice UNIT 05
1 File
2 Clone repository
5.1. Simple Practice UNIT 05
1 File
2 Open
5.1. Simple Practice UNIT 05
main.py
1 mini_project
2 OK
5.1. Simple Practice UNIT 05
$ python3 main.py 4 1
5.1. Simple Practice UNIT 05
Push origin
5.1. Simple Practice UNIT 05
First Approach
‣ The first way is to give Peter permission on this Repository. When Daniel designates Peter as a Collaborator,
Peter is free to push to this Repository. As is is free, this method requires more mutual discussion and
management.
5.1. Simple Practice UNIT 05
Second Approach
5.1. Simple Practice UNIT 05
1 Settings
2 Manage access
3 Invite a collaborator
5.1. Simple Practice UNIT 05
5.1. Simple Practice UNIT 05
Accept invitation
View invitation
5.1. Simple Practice UNIT 05
Push origin
5.1. Simple Practice UNIT 05
5.1. Simple Practice UNIT 05