此为历史版本和 IPFS 入口查阅区,回到作品页
Makzan
IPFS 指纹 这是什么

作品指纹

Git Reference Logs in 1 minute

Makzan
·
·
The git reference logs command allows us to refer to where the branch was pointing to. That enables us to rescue the commits that are already missing in the git log.

Hey there, this is Thomas from Macao.

In this video, I would like to talk about the git reference logs.

The Git reference logs command gives us the ability to rescue any removed commits, at least in a short period before we purge the log history. 

For example, if we want to group the latest 3 commits into 1 commit before pushing it to remote, we may perform a soft reset and then create a single commit again. That commit will contain all the changes for those 3 commits. 

But if anything went wrong and we want to revert to the state before we reset, we need the reference of the original 3 commits. 

By using the git reflog command, we can show the original 3 commits and the hash. We can then reset the branch back to the state where we were in.

That’s it for the basic git reference log introduction. In the next video, I will show the date range query for commits and combine it with the git reference log.


CC BY-NC-ND 2.0 授权