git在哪里存储上次检出的分支?
当我做git checkout - ,git会检查我检出的最后一个分支。 信息存储在哪里?
它扫描.git/logs/HEAD (引用日志中为HEAD最后一行看起来像):
checkout: moving from <branchA> to <branchB>
“最后一个分支”是branchA
正如@SergioTulentsev所链接的文章中所说:
git checkout -是git checkout @{-1}的简写。
@{-1}是最后一个checkout: ...的branchA checkout: ... @{-2}是前一个到最后一个checkout: ...的branchA checkout: ... 上一篇: Where does git store the last checked out branch?
下一篇: Managing signalR notifications to synchronize client and server (c#)
