Git
Sitdhibong Laokok<sitdhibong@gmail.com>
/ɡɪt/
—Linus Trovalds
Installation
Linux
• Debian/Ubuntu
$ apt-get install git
• Fedora
$ yum install git
• FreeBSD
$ cd /usr/ports/devel/git && make install
OS X
$ ruby -e "$(curl -fsSL https://
raw.githubusercontent.com/Homebrew/install/
master/install)”
$ brew install git && brew link git
Windows ?
Authentication
Command alert (Optional)
Key generation
Linux & OS X
$ mkdir ~/.ssh || cd ~/.ssh
$ ssh-keygen [-b x1024] [-C “Some comment”] 

[-f file_name]
Windows
เปิดหน้าต่าง Command Prompt ตามด้วยคำสั่ง
$ setx HOME “%userprofile%”
$ setx GIT_HOME “c:Program FilesGit”
$ setx PATH “%PATH%;%GIT_HOME%usrbin”
ปิดหน้าต่าง Command Prompt
Windows
เปิดหน้าหน้า Command prompt ใหม่อีกครั้ง
$ cd %HOME%
$ mkdir .ssh && cd .ssh
$ ssh-keygen [-b x1024] [-C “Some comment”] 

[-f file_name]
Key setup
Configuration file
$ vim ~/.ssh/config
Host 203.185.132.59
HostName 203.185.132.59
User (Your_User_Name)
IdentityFile (file_name)
Test key
$ ssh -T git@203.185.132.59
The authenticity of …..
… . . (yes/no)
Welcome to GitLab, <Your_real_name>!

Git installation