1.下載git客戶端
https://git-scm.com/
ssh-keygen -C "your@email.address" -t rsagit
2. 把下面文件的內容複製到 https://github.com/settings/keys
Windows:
C:\Users\GengZhaoyun\.ssh\id_rsa.pub
Linux:
.ssh\id_rsa.pubgithub
測試是否配製正確
ssh -T git@github.com
顯示
Hi gengzhaoyun! You've successfully authenticated.ssh
3.配製用戶名和email
git config --global user.name "your name" //配置用戶名
git config --global user.email "your email" //配置email測試
4.進入工做文件夾
git clone git@github.com:gengzhaoyun/first_project.gitthis
5.修改並提交代碼
git init
git add
git commit -m 'this is in ...'
git remote add origin git@github.com:gengzhaoyun/first_project.git //將本地與遠程關聯起來
git pull origin master
git push origin masterrem