常用命令
git clone 克隆
git add -A 添加全部
git commit -m "消息" 提交
git commit -am "提交说明": -a, --all,commit all changed files。提交全部改变的文件
git push -u origin master push
git pull --rebase origin master pull=fetch+merge
git push -f origin master 强制推送
git status 查看当前状态 修改新增删除哪些文件
问题
- 每次 git pull 都需要输入密码
解决方案:打开git-bash
ssh-keygen -p
Enter file in which the key is (/c/Users/zhangjianshan1992/.ssh/id_rsa):(这里输入密码)
Key has comment 'zhangjianshan1992@zhangjianshan'
Enter new passphrase (empty for no passphrase):(这里直接回车就是可以空密码连接)
Enter same passphrase again:(继续回车)
Your identification has been saved with the new passphrase.