1. Git Introduction¶
1.1. About Version Control¶
[com19]
1.1.1. Why we have Version Control?¶
1.1.2. Centralized vs. Decentralized¶
Centralized:
Single truth
Simple revision numbers
Timeline is always straight
Single point of failure
Simpler branches
Small number of branches
Decentralized
Unable to use incremented int as revision numbers
Use hashes
All repositories are equal
Any repository can have different history
More diverged branches
Can have many branches
1.2. Design Philosophy¶
Tracking file permissions
Tracking file renames and moves
Key-Value Storage of Immutable Objects
Working Offline
Efficient Storage
1.3. Use Cases¶
1.4. Assignments¶
1.4.1. SSH key¶
Create and login to Github account
If you don't have
.ssh/id_rsa
lub.ssh/id_rsa.pub
run commandssh-keygen
Add
your.email@example.com/hostname
to the end of your public key~/.ssh/id_rsa.pub
(as a comment)Add
ssh
public key~/.ssh/id_rsa.pub
to Github profile
1.4.2. Repository Hosting¶
create accounts
create repo
protect branches
add collaborators
clone & touch .gitignore & push
pull-request