git-远程分支管理
一、远程分支管理
查看远程库的信息:git remote -v
查看远程库的分支:git ls-remote origin
推送本地分支:git push origin 【分支名】
从本地创建分支同步远程的分支:git checkout -b 【分支名】origin/【远程的分支名】#本地分支最好和远程分支名一样
从远程分支拉取:git pull
1:在远程仓库创建分支,按照下图步骤,输入分支的名
2:点击branches可以查看当前项目的分支情况,master分支是默认的,删除分支点击分支右方的垃圾桶标志
4:在本地git
查看远程仓库信息
[root@ghs gitroot]# git remote -v
origin https://github.com/guhongshun/ceshi.git (fetch)
origin https://github.com/guhongshun/ceshi.git (push)
5:查看远程仓库分支,红色字体为远程分支的名字
[root@ghs gitroot]# git ls-remote origin
4e175dacefad96bab606f32f3d80f26fdbbd3a09 HEAD
4e175dacefad96bab606f32f3d80f26fdbbd3a09 refs/heads/master
4e175dacefad96bab606f32f3d80f26fdbbd3a09 refs/heads/yuanche
记录每一天有趣的事情!!

浙公网安备 33010602011771号