一个人寂寞地码代码,也要和不同设备上的自己合作交互哦。
1 2
| $ git clone ssh://username@host/programname.git "文件夹" #克隆项目
|
1 2 3 4 5
| $ git add. #提交文件至暂存区
$ git commit -m [message] #提交文件至仓库区
|
1 2 3 4 5
| #免密码设置: $ git config --global user.name "hehe" $ git config --global user.email "hehe@xx.com" $ ssh-keygen -t rsa -C "heheKey" #执行后的输入全部为空,直接回车就好;复制id_rsa.pub文件内容在版本库用户个人资料里设置SSH Keys。
|
妄想能一键提交至服务器,有空研究下钩子怎么写。