Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6640297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:39:21+00:00 2026-05-25T23:39:21+00:00

I noticed the ability of git to checkout to a specific commit. After that,

  • 0

I noticed the ability of git to checkout to a specific commit. After that, I began to understand how git really works.

But I want to be sure that this is correct:
When I create a branch, it is nothing more than a tag that points to the current commit. When I checkout this branch, I checkout the commit this “tag” points to. Now, when I commit something, a new commit is created. The current checked out branch tag is now updated, so that it points to the new commit.

So… in fact, I could do all of this manually, right?
It´s just a feature to make things easier.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:39:22+00:00Added an answer on May 25, 2026 at 11:39 pm

    Yes, that’s a good model for what a branch is. Beware, though, about the terminology – git also has a concept of tags, but tags don’t move – they forever point to the same commit.


    Update: adding a little more detail, which might be of interest…

    Your current branch is stored in the file HEAD, which either points to a branch, in which case the contents look like:

    ref: refs/heads/master
    

    … or it points directly to a commit, in which case the contents will look like:

    2b45553eec2019594724dcbb4c252a74cbb5f38e
    

    In the former case, the branch master is advanced when you create a new commit, but in the latter situation (known as “detached HEAD” for hopefully obvious reasons), no branch will be changed when you create a new commit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I noticed a blog post from Google that mentions the ability to paste images
The official documentation states the following: . But I have noticed that there are
I've noticed that some sites (usually banks) suppress the ability to paste text into
I noticed that various systems use various characters as the replacent for illegal ones
I noticed that on my Vista and XP machines, the automatic update is asking
I noticed that JavaScript's new Date() function is very smart in accepting dates in
I noticed a moment ago that my .gitconfig -file was public at my repo.
I noticed that every time that I restart my computer I have to do
We noticed that when testNG test cases extend TestCase (JUnit) those tests start executing
I noticed that most scripts for e-mail validation do not use DNS information to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.