git备忘

 //初始化仓库

git init 

git config --global user.name 'userName' //设置git账户,userName为你的git账号

git config --global user.email 'email'

git config --global user.name //获取当前登录的用户

git config --global user.email //获取当前登录用户的邮箱

查看是否有密钥

cd ~/.ssh

若没有文件夹,则创建密钥

ssh-keygen -t rsa -C 'xxxx@163.com'

cd ~/.ssh

gedit id_rsa.pub     //查看密钥,登录github添加进去

原文地址:https://www.cnblogs.com/zmm1996/p/10662637.html