日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

使用git checkout命令切换到指定的commit

發布時間:2023/12/19 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用git checkout命令切换到指定的commit 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

git checkout命令有很多種用法。

  • git checkout + 分支名,切換到指定的分支。
  • 比如git checkout develop:

    切換之后,HEAD文件的內容:

    ref: refs/heads/develop

  • git checkout + 文件夾
  • 丟棄工作區域中指定文件夾下面的修改:

  • git checkout + commit id
  • 切換到指定的commit上去。

    You are in ‘detached HEAD’ state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by performing another checkout.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -b with the checkout command again. Example:

    git checkout -b

    HEAD is now at 7bda819fd fix: organization library should compile without core style library (#9637)

    現在HEAD文件的內容:
    7bda819fdf88bd171f63bcc155b8002b6d2a2a8e

    更多Jerry的原創文章,盡在:“汪子熙”:

    創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

    總結

    以上是生活随笔為你收集整理的使用git checkout命令切换到指定的commit的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。