Git常用命令(不断更新中)

//获取仓库
git clone storage

//添加文件
git add file

//删除文件
git rm file

//提交文件到本地仓库
git commit -m "comment" file

//获取最新更新
git pull

//提交本地仓库
git push

//查看分支
git branch

//还原文件
git checkout file

//对比文件
git diff file1 file2

//提交分支
git push origin 分支名

//获取分支更新
git pull origin 分支名

//查看all分支
git branch -a

//查看远程分支?
git brach -r

//切换分支
git checkout 分支名

//删除本地分支
git branch -d 分支名

//查看仓库地址
git remote -v

猜你喜欢

转载自rallm007.iteye.com/blog/2020900