84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
git branch -rd remote_name/branch_name删除后提示成功,使用git branch -r得到远程分支列表,没有了分支remote_name/branch_name,再使用git pull发现又从远端获得了分支branch_name,那git branch -rd remote_name/branch_name删除的是什么?
git branch -rd remote_name/branch_name
git branch -r
git pull
这里给出我的git版本:git versiongit version 2.7.0.windows.1
git version
git branch -r操作的是remote-tracking branch这个branch依然是你本地的,不过它不能被编辑。譬如当你从一个remote上fetch时,如果在此之前其他人在remote上提交了一个新的分支somebranch, you may see the following message:
remote-tracking branch
remote
fetch
somebranch
git fetch origin remote: Counting objects: 1, done. remote: Compressing objects: 100% (1/1), done. remote: Total 1 (delta 0), reused 1 (delta 0) Unpacking objects: 100% (1/1), done. [new branch] somebranch -> origin/somebranch
At this time, you have one more local branchorigin/somebranchThis is a remote-tracking branch, and then you can checkout one from it to do your work:
origin/somebranch
git checkout -b sbranch origin/somebranch
Remote branches can only be deleted throughgit push.
git push
git branch -r
操作的是remote-tracking branch
这个branch依然是你本地的,不过它不能被编辑。譬如当你从一个
remote
上fetch
时,如果在此之前其他人在remote
上提交了一个新的分支somebranch
, you may see the following message:At this time, you have one more local branch
origin/somebranch
This is a remote-tracking branch, and then you can checkout one from it to do your work:Remote branches can only be deleted through
git push
.