How to generate a temporary br by checkout in git usage
Git casually used the git checkout ver_hash command a few days ago. When the result is pushed to the remote database, the message everything is up-to-date is displayed. The actual Shenma has not been submitted! But check that there are indeed updates in the local log! Later, when I run the git st command again, I found a red line:
HEAD detached from 548a7fa
After research, it seems that a temporary br is generated:
* (Detached from 548a7fa) b7451ea v0.8 re-import the real question bank
Add paging function to master 548a7fa v0.6
Every time this cat is a git push origin master, it cannot be updated, because the master is consistent with the remote database, but it is old.
After knowing the cause, it is easy to solve the problem. directly use git checkout master to switch back to the master br, and then don't forget to use
Git reset -- hard b7451
Switch the command to the latest hash.
GitHub Tutorials:
GitHub tutorials
Git tag management details
Git branch management
Git remote repository details
Git local Repository (Repository) Details
Git server setup and Client installation
Git Overview
Share practical GitHub tutorials
This article permanently updates the link address: