Git Reference Logs in 1 minute
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.
喜欢我的作品吗?别忘了给予支持与赞赏,让我知道在创作的路上有你陪伴,一起延续这份热忱!
- 来自作者
- 相关推荐