github email
Git

Git 常用命令

1.初始化仓库信息

 git init
  1. 增加文件信息到库
 git add -A
  1. 提交代码
 git commit -m "first commit"
  1. 同步到远程库
 git push -u origin master
  1. 将远程库信息同步到本地
 git clone http://192.168.100.226:3000/guoby/wzry.git
  1. 撤销提交操作
git commit --amend
  1. 重新更新git服务器信息
git remote rm origin
git remote add origin http://192.168.100.201:3000/guoby/wzry.git
git push -u origin master
  1. 删除文件

8.1 删除单个文件

git rm ._ddd.file

8.2 删除多个文件

find . -name "._*" -delete
git add -A
git commit -m 'delete others file'
  1. 强制覆盖本地文件
git fetch --all  
git reset --hard origin/master 
git pull