git 命令查看远程tag
发布网友
发布时间:2022-04-29 01:50
我来回答
共1个回答
热心网友
时间:2022-04-23 21:41
【查看远程分支】
$ git branch -a
master
remote
tungway
v1.52
* zrong
remotes/origin/master
remotes/origin/tungway
remotes/origin/v1.52
remotes/origin/zrong
【删除远程分支和tag】
$ git push origin --delete <branchName>
【删除tag这么用】
git push origin --delete tag <tagname>
否则,可以使用这种语法,推送一个空分支到远程分支,其实就相当于删除远程分支:
git push origin :<branchName>
这是删除tag的方法,推送一个空tag到远程tag:
git tag -d <tagname>
git push origin :refs/tags/<tagname>
两种语法作用完全相同。
【重命名远程分支】
$ git branch -av
* devel 752bb84 Merge pull request #158 from Gwill/devel
master 53b27b8 Merge pull request #138 from tdlrobin/master
zrong 2ae98d8 modify CCFileUtils, export getFileData
remotes/origin/HEAD -> origin/master
remotes/origin/add_build_script d4a8c4f Merge branch 'master' into add_build_script
remotes/origin/devel 752bb84 Merge pull request #158 from Gwill/devel
remotes/origin/devel_qt51 62208f1 update .gitignore
remotes/origin/master 53b27b8 Merge pull request #138 from tdlrobin/master
remotes/origin/zrong 2ae98d8 modify CCFileUtils, export getFileData
【删除远程分支】
$ git push --delete origin devel
To git@github.com:zrong/quick-cocos2d-x.git
- [deleted] devel
【重命名本地分支】
git branch -m devel develop
【推送本地分支】
$ git push origin develop
Counting objects: 92, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (58/58), 1.38 MiB, done.
Total 58 (delta 34), reused 12 (delta 5)
To git@github.com:zrong/quick-cocos2d-x.git
* [new branch] develop -> develop