How to generate a temporary br by checkout in git usage

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.