【问题标题】:Push temporary git branch to remote without files or changes在没有文件或更改的情况下将临时 git 分支推送到远程
【发布时间】:2023-02-02 01:30:28
【问题描述】:

我们有一个 git master 分支。我们从这个分支创建功能分支并将这些功能分支合并到主分支中。

我们现在需要一个“临时”分支,从那里我们分支出一些功能分支。这些功能分支将合并到 temporary 分支中。

我如何将新的“临时”分支(没有任何文件或更改)推得太远,以便其他人也能够从该分支分支出来?

【问题讨论】:

    标签: git git-branch


    【解决方案1】:

    如果我正确理解你的问题,这些是步骤:

    git checkout master
    git checkout -b temporary
    git push -u origin temporary
    

    然后,任何开发人员都应该这样做:

    git fetch
    git checkout temporary
    git checkout -b myNewBranch
    << user does things >>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-10
      • 2016-07-08
      • 2017-06-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-09
      • 2012-07-25
      相关资源
      最近更新 更多