git创建和删除远程分支
2013-11-05 13:12
337 查看
问题描述:
使用git创建和删除远程分支
问题解决:
(1)git创建本地分支
注:
如上所示,使用命令 git branch -a 查看所有分支情况,以及当前分支
使用命令git branch temporary 创建分支temporary
使用命令 git checkout temporary 切换到temporary分支
(2)git创建远程分支
注:
如上所示,在本地分支 temporary中创建文件 并commit之后,创建远程分支 git push origin temporary:temporary
其中origin是远程仓库,第一个temporary是本地分支,第二个temporary是远程新建的分支(github中为例子)
注:
如上图所示 temporary是刚才创建的远程分支
(3)删除远程分支
1)使用命令 git push origin --delete 远程分支名
注:
使用命令 git push origin --delete hello (hello为远程分支名称)
注:
github中删除远程分支hello之后效果图
2)使用命令 git push origin :temporary
注:
使用命令 git push origin :远程分支名
注:
删除远程分支之后的效果图
使用git创建和删除远程分支
问题解决:
(1)git创建本地分支
注:
如上所示,使用命令 git branch -a 查看所有分支情况,以及当前分支
使用命令git branch temporary 创建分支temporary
使用命令 git checkout temporary 切换到temporary分支
(2)git创建远程分支
注:
如上所示,在本地分支 temporary中创建文件 并commit之后,创建远程分支 git push origin temporary:temporary
其中origin是远程仓库,第一个temporary是本地分支,第二个temporary是远程新建的分支(github中为例子)
注:
如上图所示 temporary是刚才创建的远程分支
(3)删除远程分支
1)使用命令 git push origin --delete 远程分支名
注:
使用命令 git push origin --delete hello (hello为远程分支名称)
注:
github中删除远程分支hello之后效果图
2)使用命令 git push origin :temporary
注:
使用命令 git push origin :远程分支名
注:
删除远程分支之后的效果图
相关文章推荐
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git---使用git命令删除本地分支、远程分支、拉取其他分支的远程分支代码、创建查看本地远程分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支
- git 查看远程分支、本地分支、创建分支、把分支推到远程repository、删除本地分支