加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

git/github创建新分支

发布时间:2020-12-14 16:41:06 所属栏目:百科 来源:网络整理
导读:git/github创建新分支 创建新的git仓库 git add readme.md # 添加新文件 git commit -m "some description" git remote add origin git@github.com:linganmin/learn-laravel5.3-wanli.git # 添加远端仓库地址 git push -u origin master # 提交到远端 在新仓

git/github创建新分支

创建新的git仓库

git add readme.md # 添加新文件

git commit -m "some description"

git remote add origin git@github.com:linganmin/learn-laravel5.3-wanli.git # 添加远端仓库地址

git push -u origin master # 提交到远端

在新仓库中创建分支

git checkout newbranch # 切换到新分支

git push origin newbranch # 将新分支提交到远端

git branch -d newbranch # 删除本地分支

git psuh origin :newbranch # 删除远端分支,分支前的冒号代表删除

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读