1.链接远程仓库
$ git remote add origin 仓库地址
// 链接远程仓库
$ git clone 仓库地址
//克隆远程仓库
$ git clone -b dev 远程仓库
// 克隆指定分支
$ git remote rm 远程仓库名称
//删除连接的远程仓库
2.获取远程代码
$ git pull origin master
// 强制 pull
$ git pull origin master --allow-unrelated-histories
3.push代码
//初次提交,需要配置用户信息
$ git config --global user.name "name"
$ git config --global user.email "email"
$ git status 查看装填
$ git add 文件路径
// 提交全部
$ git add .
$ git commit -m "本次提交说明"
$ git push origin master
4.附Git常用命令速查表

网友评论