<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [TOC] ## 1.從主分支新開開發分支 ``` # 獲取主干最新代碼 $ git checkout master $ git pull # 新建一個開發分支myfeature $ git checkout -b myfeature ``` ## 2. 提交分支commit ``` $ git add . $ git status $ git commit --verbose ``` - verbose參數,會列出 diff 的結果。 ## 3. 提交commit 信息 請查看 [commit 規范](commit%E8%A7%84%E8%8C%83.md) ## 4. 提交前獲取最新主分支 ``` $ git fetch origin $ git rebase origin/master ``` ## 5. 合并commit 分支開發完成后,很可能有一堆commit,但是合并到主干的時候,往往希望只有一個(或最多兩三個)commit ``` $ git rebase -i origin/master ``` - rebase命令的i參數表示互動(interactive),這時git會打開一個互動界面 ``` pick 07c5abd Introduce OpenPGP and teach basic usage pick de9b1eb Fix PostChecker::Post#urls pick 3e7ee36 Hey kids, stop all the highlighting pick fa20af3 git interactive rebase, squash, amend ... ``` - 當前分支最新的4個commit(越下面越新) - 每個commit前面有一個操作命令,默認是pick,表示該行commit被選中,要進行rebase操作 ``` pick:正常選中 reword:選中,并且修改提交信息; edit:選中,rebase時會暫停,允許你修改這個commit(參考這里) squash:選中,會將當前commit與上一個commit合并 fixup:與squash相同,但不會保存當前commit的提交信息 exec:執行其他shell命令 ``` 示例 ``` pick 07c5abd Introduce OpenPGP and teach basic usage f de9b1eb Fix PostChecker::Post#urls f 3e7ee36 Hey kids, stop all the highlighting pick fa20af3 git interactive rebase, squash, amend ``` - 還是會生成兩個commit,第二行和第三行的commit,都合并到第一行的commit。 - 新的提交信息里面,第三行commit的提交信息,會被注釋掉 ## 6. 推送到遠程倉庫 ``` $ git push [--force] origin myfeature ``` - 因為rebase以后,分支歷史改變了,跟遠程分支不一定兼容,有可能要強行推送 ## 7. 發出Pull Request 提交到遠程倉庫以后,就可以發出 Pull Request 到master分支,然后請求別人進行代碼review,確認可以合并到master
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看