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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 一、日志 1、查看某個文件的修改記錄 ~~~ git log test.html ~~~ 2、格式化log ~~~ git log --pretty=online test.html 格式化log ~~~ 3、查看某個文件的修改歷史 ~~~ git log public/js/a.js git show 72735c62aba8fd2a9420a0f9f83d22543e3c164f ~~~ 對應遠程文件查看 ![](https://box.kancloud.cn/03b1ec564d174ee4f655f7e4edda7b7e_985x210.jpg) ## 二、分支(branch) 1、查看遠程分支 ~~~ git branch -r ~~~ 2、查看所有分支 ~~~ git branch -a ~~~ 3、刪除遠程分支(test) ~~~ git branch -r -d origin/test git push origin :test // 或 git push origin -d test ~~~ 4、恢復刪除的分支 test:分支名 4926d92:操作反饋的hash_value ~~~ git branch test 4926d92 ~~~ 5、備份分支 ~~~ git checkout -b bakcup_v1.0.0 git push origin bakcup_v1.0.0 ~~~ 6、修改本地分支名 ~~~ git branch -m old new ~~~ 7、根據指定提交創建新分支 ~~~ git checkout [commit id] -b [branch name] ~~~ 這只是在本地創建的,如果想提交到遠端,需要push上去 在 Source Tree中 ![](https://box.kancloud.cn/6a3b82ada6583ff74956bbb3bc275fe1_729x372.jpg) ![](https://box.kancloud.cn/ca94e85335bb17ab267d93819f1bf1fe_626x244.jpg) 8、推送分支到遠程倉庫 ``` git push origin branch1 ``` 9、刪除分支 ~~~ git branch -d branch1 git push origin --delete branch1 ~~~ ![](https://box.kancloud.cn/4cb2dc7a23b5edd0bf4dff4de271e5bc_437x144.jpg) ## 三、標簽(tag) 1、創建輕量標簽 ~~~ git tag v0.2.0 -light ~~~ 2、創建附注標簽(參數-a即annotated的縮寫) ~~~ git tag -a v0.1.0 -m "release 0.1.0 version" ~~~ 3、列出當前倉庫的所有標簽 ~~~ git tag ~~~ 4、列出符合模式的標簽 ~~~ git tag -l 'v0.1.*' ~~~ 5、查看標簽版本信息 ~~~ git show v0.1.0 ~~~ 6、切換標簽與切換分支命令相同 ~~~ git checkout [tagname] ~~~ 7、刪除標簽 ~~~ git tag -d v0.1.2 ~~~ 8、給指定的commit打標簽 ~~~ git tag -a v0.1.0 49e0cd22f6bd9510fe65084e023d9c4316b446a6 ~~~ 9、將v0.1.0標簽提交到git服務器 ~~~ git push origin v0.1.0 ~~~ 10、將本地所有標簽一次性提交到git服務器 ~~~ git push origin -–tags ~~~ ## 四、checkout 1、撤銷工作區test.js的修改 ~~~ git checkout -- test.js ~~~ 撤銷指定目錄(.即./)下的工作區的修改 ~~~ git checkout head . // 或 git checkout . ~~~ 附加:清除所有新建的文件及文件夾 ~~~ git clean -df ~~~ ## 五、reset 1、撤銷暫存區test.js的修改(取出添加到暫存區的test.js文件) ~~~ git reset HEAD -- test.js ~~~ 2、撤銷指定目錄(.即./)下的暫存區的修改(取出添加到暫存區的./目錄下的所有文件) ~~~ git reset HEAD . // 或 git reset . ~~~ ## 六、標簽tag操作 1、查看標簽 ~~~ git tag git tag -l git tag -l -n // 標簽+注釋 ~~~ 2、添加本地標簽 ~~~ git tag v1.0.0 ~~~ 加備注信息 ~~~ git tag -a v1.0.0 -m '版本1' ~~~ 3、推送到遠程 ~~~ git push origin v1.0.0 ~~~ 4、刪除本地標簽 ~~~ git tag -d v1.0.0 ~~~ 5、刪除遠程標簽 ~~~ git push origin :refs/tags/v1.0.0 ~~~ 或git版本>1.7.0 ~~~ git push origin --delete tag v1.0.0 ~~~ ## 七、配置config 1、查看配置 ~~~ git config -l // 查看局部 git config --global -l // 查看全局 ~~~ 全局配置文件:C:\Users\win10\\.gitconfig 2、添加配置 ~~~ // 本地 git config user.name "test" git config user.email "test@gmail.com" // 全局 git config --global user.name "test" git config --global user.email "test@gmail.com" ~~~ 3、刪除配置 ~~~ git config --unset user.name // 刪除本地配置項 git config --global --unset user.name // 刪除全局配置項 ~~~ 或者找到配置文件,用記事本打開,刪除也行 ## 八、commit 1、修改提交的注釋 ~~~ git commit --amend -m 'your new message' ~~~ ## 九、diff 1、查看未add的文件修改 ~~~ git diff ~~~ 2、查看已經add,但沒有commit 的改動 ~~~ git diff --cached ~~~ 3、上面兩條合體 ~~~ git diff HEAD ~~~ ## 十、show 1、查看最新的commit ~~~ git show ~~~ 2、查看指定commit hashID的所有修改 ~~~ git show commitId ~~~ 3、查看某次commit中具體某個文件的修改 ~~~ git show commitId fileName ~~~
                  <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>

                              哎呀哎呀视频在线观看