git config --global user.name "用户名" git config --global user.email "邮箱"
2、通过终端命令创建ssh key
ssh-keygen -t rsa -C "邮箱"
Last login: Sat Jan 6 14:12:16 on ttys000 WMBdeMacBook-Pro:~ WENBO$ ssh-keygen -t rsa -C "邮箱" Generating public/private rsa key pair. Enter file in which to save the key (/Users/user/.ssh/id_rsa): /Users/user/.ssh/id_rsa already exists. Overwrite (y/n)? WMBdeMacBook-Pro:~ user$
cat .ssh/id_rsa.pub
终端在导航栏view-->terminal
//文件添加到仓库(.代表提交所有文件) git add . //把文件提交到仓库 git commit -m "First Commit" //上传到github git push