git 删除远程master 分支

?  fekit-extension-yo git:(dev) git push origin :master
remote: error: By default, deleting the current branch is denied, because the next
remote: error: ‘git clone‘ won‘t result in any file checked out, causing confusion.
remote: error:
remote: error: You can set ‘receive.denyDeleteCurrent‘ configuration variable to
remote: error: ‘warn‘ or ‘ignore‘ in the remote repository to allow deleting the
remote: error: current branch, with or without a warning message.
remote: error:
remote: error: To squelch this message, you can set it to ‘refuse‘.
remote: error: refusing to delete the current branch: refs/heads/master
To [email protected]:fed/yobuilder.git
 ! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to ‘[email protected]:fed/yobuilder.git‘

-->

时间: 2024-08-28 09:37:32

git 删除远程master 分支的相关文章

git 删除远程分支 branch

git 删除远程分支 : git push origin :远程分支 例如删除远程分支 osc(楼主的origin是 osc): [email protected] MINGW64 ~/workspace/HelloWorld/src/selenium (master)$ git push osc :oscTo [email protected]:wuzhiyi51/selenium_learn.git - [deleted] osc git 创建分支(branch) git branch te

git删除远程分支【转】

本文转载自:https://my.oschina.net/tsingxu/blog/84601 如果不再需要某个远程分支了,比如搞定了某个特性并把它合并进了远程的 master 分支(或任何其他存放 稳定代码的地方),可以用这个非常无厘头的语法来删除它:git push  [远程名] :[分支名].如果想在服务器上删 除 serverfix 分支,运行下面的命令: git push origin :serverfix To git@github.com:schacon/simplegit.git

【Gitlab】GIT回滚master分支到指定tag版本 并提交远程仓库

[Gitlab]GIT回滚master分支到指定tag版本 并提交远程仓库1 查看分支git branch 2 切换到master分支git checkout master 3 查看标签git tagv1.3.3v1.3.4v1.3.5 4 查看某个标签的详情git show v1.3.5commit fb479960c0cec5549463ae123d70bdd72ccf6be7 5 通过commit id回退git reset --hard fb479960c0cec5549463ae123

VS2013中使用git发布解决方案master分支的时候出现错误

环境:VS2013+ 码云(https://git.oschina.net/)错误描述:在VS2013中使用git发布解决方案master分支的时候出现“无法将本地分支 master 发布到远程存储库 origin,因为此处已存在具有同一名称的分支.您可能需要重命名您的本地分支,然后重试”,如下图所示 其实官网创建时已经给出了解决办法: 1.创建项目的时候不需要选择自动创建ReadMe文件,如果已经创建可以选择清空项目 创建项目后(不含ReadMe文件)Code版块会自动跳转到该提示 根据该提示

git删除远程分支中的文件

一开始没有把git项目中的.classpath加入到.gitignore中,导致远程分支中一直存在这个文件,这样在其他机器上执行git pull时,会导致本地的.classpath被破坏,而使得这个项目的引用出现问题.由此,我们需要把远程分支中的.classpath文件删除. 1. 一种想法是把.classpath文件加入到gitignore中,这样在下次提交的时候就不会提交.classpath文件,但是这种做法并不会使得远程分支中的.classpath文件被删除. 2. 下面有比较挫的方法来解

git 删除远程分支

1.可以使用这种语法删除远程分支 git push origin --delete <branchName> 删除tag这么用: git push origin --delete tag <tagName> 2. 删不掉可以使用这种语法,推送一个空分支到远程分支,其实就相当于删除远程分支 git push origin :<branchName> 这是删除tag的方法,推送一个空tag到远程tag git tag -d <tagName> git push

git删除远程文件夹或文件的方法

由于本地修改了文件夹大全名大小写的原因,同步到git上并不区分大小写,造成了一些文件同步不了,所以要先把git远程库上文件夹删除掉,然后再重新同步 如下,我把src里的全部移除,但是本地文件还保留. git rm -r -n --cached  */src/\*      //-n:加上这个参数,执行命令时,是不会删除任何文件,而是展示此命令要删除的文件列表预览. git rm -r --cached  */src/\*      //最终执行命令. git commit -m"移除src目录下

Git从远程的分支获取最新的版本到本地

有时候需要从远程git服务器获取某个远程分支的代码,命令是 git fetch origin  remote-branch:local-branch ,这个命令比较容易忘记,特别记录下. 1. 查看远程仓库 git remote -v origin http://git.dev.qianmi.com/elifeapp/weidian.git (fetch) origin http://git.dev.qianmi.com/elifeapp/weidian.git (push) 2.从远程获取最新

(git fetch git push git pull)远程本地分支互相推送更新

git push origin bug_huiyuan:mobile_attribution 把bug_huiyuan(本地分支) 推送到 远程mobile_attribution分支 git push origin master:master 把当地分支master 推送到远程master 可简写成 git push origin