您的位置:首页 > 其它

git

2014-04-03 16:14 267 查看
1. 删除远程分支social

git branch -d -r origin/social
删除服务器分支:git push origin :social

2. 查看远程分支
git branch -a

3.在本地版本库中删除所有远程版本库中已不存在的分支
git remote prune

4.新建分支
新建本地分支: 1> git checkout -b sign_up
推送到远程: 2> git push origin sign_up:sign_up
链接本地和远程分支: 3> git branch --set-upstream sign_up origin/sign_up

5.合并分支
git merge --no-ff 确保总是新生成一个提交,避免丢失曾经存在一个特性分支的历史信息,也能够方便地看出哪些提交属于同一个特性
git merge

6.还原修改
  git checkout -- .

7. 查看远程关联
git remote -v
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: