git 常用指令
2016-11-15 14:26
204 查看
1、更新代码
git pull
2、提交代码
git push
3、切换到新的分支
git checkout [分支名]
4、拉取新项目
git clone [项目地址]
5、查看项目git地址
git remote -v
6、本地代码回滚到某一次提交
git reset --soft [commit-id]
7、查看本地分支
git branch
8、查看远程分支
git branch -a
9、查看分支tag
git tag
10、根据tag创建本地分支
git branch [本地分支名] [tag]
11、将分支合并到本地分支
git merge [分支名]
12、修改本地分支名
git branch -m [本地分支名] [新分支名]
13、创建远程分支
git push origin [本地分支名]
14、删除远程分支
git push origin :[本地分支名]
15、远程分支和本地分支关联
git branch --set-upstream-to=origin/[远程分支名] [本地分支名]
git pull
2、提交代码
git push
3、切换到新的分支
git checkout [分支名]
4、拉取新项目
git clone [项目地址]
5、查看项目git地址
git remote -v
6、本地代码回滚到某一次提交
git reset --soft [commit-id]
7、查看本地分支
git branch
8、查看远程分支
git branch -a
9、查看分支tag
git tag
10、根据tag创建本地分支
git branch [本地分支名] [tag]
11、将分支合并到本地分支
git merge [分支名]
12、修改本地分支名
git branch -m [本地分支名] [新分支名]
13、创建远程分支
git push origin [本地分支名]
14、删除远程分支
git push origin :[本地分支名]
15、远程分支和本地分支关联
git branch --set-upstream-to=origin/[远程分支名] [本地分支名]
相关文章推荐
- git常用指令
- svn和git常用指令
- git 常用指令详解
- iOS开发——源代码管理——git(分布式版本控制和集中式版本控制对比,git和SVN对比,git常用指令,搭建GitHub远程仓库,搭建oschina远程仓库 )
- Git本地容器常用指令总结
- GIT常用指令
- 我的git 常用指令
- Git 常用指令
- git 常用指令
- centos安装git客户端以及常用指令
- 我的git 常用指令
- 我的git 常用指令
- Ubuntu上安装git以及常用的指令学习
- Git常用指令集合
- git基础常用指令汇总
- Git 常用指令
- Git 常用指令详解
- git常用指令整理
- git 常用指令
- 常用git指令整理