(唔,mac 用户这个要求是由于集成在 terminal 中可直接使用)git
1. github 中 建立 git 帐户github
2. github -> 在我的设置中 找到 ssh and GPGkeys 页面ssh
3. Terminal 中 ssh-keygen 生成一个ssh key(可选择加入密码)spa
4. github 中 new SSH Key 建立个 title 而后加入刚生成的 keyrem
5. 在电脑目录中建立一个 项目 目录 并 newFile.txt 文件(随便什么文件)terminal
6. Terminal 中 git init it
6.1 git add newFile.txt(随便什么文件)io
6.2 git commit -m 'newFile' (最后的 newFile 是描述信息)灰色表明能够不写这两个命令,直接添加帐户ast
6.3 根据以前建立的帐户, git -config --global user.email example@email.com ( 这里是你的git邮箱)email
6.4 git -config --global user.name yourName( 这里是你的名字)
7. git remote add origin git@github.com:ming-os9/MBP.git (git@github.com: 后边的是 github 你项目的地址)
8. git add . ( 添加全部此目录的文件)
9. git commit -m 'newFile'
10. git push -u origin master (第一次 push 这个设置比较麻烦 以后就简单了)
11.1 git add .
11.2 git commit -m 'demostration for my commiting files'
11.3 git push