跳至内容
技术分享
站点工具
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
登录
搜索
您的足迹:
服务器技术:gitlab:git基本命令
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
<p>现在我在master分支上,工作目标是干净的,也没有需要commit的:<br/><br/> $ git branch<br/> * master<br/> release<br/> <br/> $ git status<br/> On branch master<br/> Your branch is up-to-date with 'origin/master'.<br/> nothing to commit, working directory clean<br/><br/>新建远程分支<br/><br/>新建一个本地分支:<br/><br/> $ git checkout -b dbg_lichen_star<br/><br/>查看一下现在的分支状态:<br/><br/> $ git branch<br/> * dbg_lichen_star<br/> master<br/> release<br/><br/>星号(*)表示当前所在分支。现在的状态是成功创建的新的分支并且已经切换到新分支上。<br/><br/>把新建的本地分支push到远程服务器,远程分支与本地分支同名(当然可以随意起名):<br/><br/> $ git push origin dbg_lichen_star:dbg_lichen_star<br/><br/>使用git branch -a查看所有分支,会看到remotes/origin/dbg_lichen_star这个远程分支,说明新建远程分支成功。<br/>删除远程分支<br/><br/>我比较喜欢的简单方式,推送一个空分支到远程分支,其实就相当于删除远程分支:<br/><br/> $ git push origin :dbg_lichen_star<br/><br/>也可以使用:<br/><br/> $ git push origin --delete dbg_lichen_star</p><p><br/></p><p><br/></p><p>chmod -R 777 conf</p><p><br/></p><p><br/></p><p>新建仓库:</p><p>在参考目录下执行: git init<br/></p><p><span style="color: rgb(79, 79, 79); font-family: "Microsoft YaHei", "SF Pro Display", Roboto, Noto, Arial, "PingFang SC", sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">chmod -R 777 your-repositoryname.git</span><br/></p><pre style="white-space: normal; color: rgb(50, 62, 50); font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(207, 204, 199); text-decoration-style: initial; text-decoration-color: initial;">git config receive.denyCurrentBranch ignore</pre><p><br/></p><p>这两种方式都可以删除指定的远程分支<br/>--------------------- <br/>作者:-FIGHTING- <br/>来源:CSDN <br/>原文:https://blog.csdn.net/u012701023/article/details/79222731 <br/>版权声明:本文为博主原创文章,转载请附上博文链接!<br/></p>
服务器技术/gitlab/git基本命令.txt
· 最后更改: 2019/02/18 16:07 由
chenjinlian
页面工具
显示页面
修订记录
反向链接
页面重命名
回到顶部