Git:变基为大师。怎么办?

Git: Rebased to Master. Now what?

这是我今天的工作流程:

  app: $ git branch
  global-nav-text
* master
  thrills-popUp
  app: $ git checkout thrills-popUp
Switched to branch 'thrills-popUp'
Your branch is up-to-date with 'origin/thrills-popUp'.
  app: $ git status
On branch thrills-popUp
Your branch is up-to-date with 'origin/thrills-popUp'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ngrok
    simple-cors-http-server.py

nothing added to commit but untracked files present (use "git add" to track)
  app: $ git branch
  global-nav-text
  master
* thrills-popUp
  app: $ git checkout global-nav-text
Switched to branch 'global-nav-text'
Your branch is up-to-date with 'origin/global-nav-text'.
  app: $ git rebase master
Current branch global-nav-text is up to date.
  app: $ git checkout thrills-popUp
Switched to branch 'thrills-popUp'
Your branch is up-to-date with 'origin/thrills-popUp'.
  app: $ git status
On branch thrills-popUp
Your branch is up-to-date with 'origin/thrills-popUp'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ngrok
    simple-cors-http-server.py

nothing added to commit but untracked files present (use "git add" to track)
  app: $ git branch
  global-nav-text
  master
* thrills-popUp
  app: $ git rebase master
Current branch thrills-popUp is up to date.
  app: $ git commit -am "Coda seems to have junked up my code. Specifically JS. The app wasn't pulling in both parks. Turns out that Coda (or something) changed 'append(newRow)' to 'append(ReturnedwRow).' There was an error from Coda after I rebased the global-nav-text branch to master. I updated the JS and all is working well now."
[thrills-popUp 737b135] Coda seems to have junked up my code. Specifically JS. The app wasn't pulling in both parks. Turns out that Coda (or something) changed 'append(newRow)' to 'append(ReturnedwRow).' There was an error from Coda after I rebased the global-nav-text branch to master. I updated the JS and all is working well now.
 1 file changed, 1 insertion(+), 1 deletion(-)
  app: $ git push --all
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 495 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://qfrank@bitbucket.org/uoix/14-03157-front-gate-sales-mat.git
   bb79a23..737b135  thrills-popUp -> thrills-popUp
  app: $ git status
On branch thrills-popUp
Your branch is up-to-date with 'origin/thrills-popUp'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ngrok
    simple-cors-http-server.py

nothing added to commit but untracked files present (use "git add" to track)
  app: $ git push origin master
Everything up-to-date
  app: $ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
  app: $ git checkout thrills-popUp
Switched to branch 'thrills-popUp'
Your branch is up-to-date with 'origin/thrills-popUp'.
  app: $ git checkout thrills-popUp
Already on 'thrills-popUp'
Your branch is up-to-date with 'origin/thrills-popUp'.

我曾经 rebase 想过它会 "merge" 我的孩子 运行 变成 master。我错了

我假设(在 rebase 之后)当我 运行 git branch 我只会看到 b[=58 的 master 和 none =]ches.

这是我的:

        o------o------o------o------o------o thrills-popUp
       /
-----o------o------o master
  \
   o------o------o global-nav-text

我最终删除了 'global-text-nav'(但它仍在我的远程仓库中)。

我的意图是将所有 b运行ches 合并到本地和远程的 master。

如何在不弄乱任何东西的情况下执行此操作?

我一直在阅读有关 pullmergerebasefetch 等内容。但我发现它有点令人困惑。

这是我试图完成的:

       o------o------o------o------o------o thrills-popUp
      /                                    \
-----o------o-------o-------o-------o-------o------o master
   \               /
    o------o------o global-nav-text

但是因为我在本地删除了 "global-nav-text",所以我可以这样做:

       o------o------o------o------o------o thrills-popUp
      /                                    \
-----o-------o-------o-------o------o-------o------o master

我不想下载远程仓库并将其与我的本地仓库混在一起。不想造成任何麻烦。

我只想 "cleanly" 合并我剩余的 b运行ch,让我的远程仓库看起来像我的本地仓库。

此外,我在我的远程仓库中看到了所有提交,但 none 的新 HTML、CSS 和我在本地添加的 JS 文件。我看到已上传的初始文件。

我想 git merge 就是您要找的。

这应该可以完成您想要完成的工作。

git pull
git fetch origin
git checkout master
git merge thrills-popUp
git merge global-nav-test
git push

它会首先获取远程存储库,以便您下载之前删除的分支,然后继续分支 master 并将其他两个合并到 master。然后将更改推送到远程仓库。