git remote 名字 连接地址 : 与远程仓库建立连接 (名字在后面的上传和下拉需要用到,主要是为了区分)
git remote -v : 查看连接列表
git remote remove 名字 : 删除连接
git add -A : 上传到缓存区
git commit -m “注释” : 写注释
git push -u 名字 分支 : 第一次上传到远程仓库
git push 名字 分支 : 上传到远程仓库
git pull 名字 : 下拉远程仓库代码(一般出现不同步的时候需要先下拉,合并后再重新上传,防止覆盖他人的代码)
git clone 链接 : 克隆代码到本地
git log : 查看日志
原文:https://www.cnblogs.com/zxn-114477/p/14641725.html