使用git checkout命令切换到指定的commit
git checkout命令有很多種用法。
比如git checkout develop:
切換之后,HEAD文件的內容:
ref: refs/heads/develop
丟棄工作區(qū)域中指定文件夾下面的修改:
切換到指定的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)
現(xiàn)在HEAD文件的內容:
7bda819fdf88bd171f63bcc155b8002b6d2a2a8e
更多Jerry的原創(chuàng)文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的使用git checkout命令切换到指定的commit的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OpenGL 性能优化
- 下一篇: 安森美半导体财报引动芯片股热潮,英伟达美