<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Git 別名 在我們結束本章 Git 基礎之前,正好有一個小技巧可以使你的 Git 體驗更簡單、容易、熟悉:別名。我們不會在之后的章節中引用到或假定你使用過它們,但是你大概應該知道如何使用它們。 Git 并不會在你輸入部分命令時自動推斷出你想要的命令。如果不想每次都輸入完整的 Git 命令,可以通過 `git config` 文件來輕松地為每一個命令設置一個別名。這里有一些例子你可以試試: ~~~ $ git config --global alias.co checkout $ git config --global alias.br branch $ git config --global alias.ci commit $ git config --global alias.st status ~~~ 這意味著,當要輸入 `git commit`時,只需要輸入 `git ci`。隨著你繼續不斷地使用 Git,可能也會經常使用其他命令,所以創建別名時不要猶豫。 在創建你認為應該存在的命令時這個技術會很有用。例如,為了解決取消暫存文件的易用性問題,可以向 Git 中添加你自己的取消暫存別名: ~~~ $ git config --global alias.unstage 'reset HEAD --' ~~~ 這會使下面的兩個命令等價: ~~~ $ git unstage fileA $ git reset HEAD -- fileA ~~~ 這樣看起來更清楚一些。通常也會添加一個 `last` 命令,像這樣: ~~~ $ git config --global alias.last 'log -1 HEAD' ~~~ 這樣,可以輕松地看到最后一次提交: ~~~ $ git last commit 66938dae3329c7aebe598c2246a8e6af90d04646 Author: Josh Goebel <dreamer3@example.com> Date: Tue Aug 26 19:48:51 2008 +0800 test for current head Signed-off-by: Scott Chacon <schacon@example.com> ~~~ 可以看出,Git 只是簡單地將別名替換為對應的命令。然而,你可能想要執行外部命令,而不是一個 Git 子命令。如果是那樣的話,可以在命令前面加入 `!` 符號。如果你自己要寫一些與 Git 倉庫協作的工具的話,那會很有用。我們現在演示將 `git visual` 定義為 `gitk` 的別名: ~~~ $ git config --global alias.visual '!gitk' ~~~
                  <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>

                              哎呀哎呀视频在线观看