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

  • Home
  • SEARCH
  • 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 8662977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:52:03+00:00 2026-06-12T16:52:03+00:00

I was wondering where Git saves all the data from branches. Everytime you switch

  • 0

I was wondering where Git saves all the data from branches.
Everytime you switch a branch all the data is put back in-place and data from another specific branch is just removed.

Does it take longer on a slower CPU/HDD to bring back the data from another branch? How does the internal work?

  • 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-06-12T16:52:05+00:00Added an answer on June 12, 2026 at 4:52 pm

    Git stores file data in objects called “blobs”. Those are stored in the .git/objects directory within the repository.

    The mapping of blobs into the directory structure is done by objects called “trees”, which are recursive – one tree can refer to other trees in the case of subdirectories.

    A commit in turn references a specific tree that is the state of the root directory of the repository at the time it was committed.

    A branch is simply a pointer to a specific commit.

    When you check out a branch, Git goes and looks up the commit that it points to. From there, it loads the tree(s) referenced by the commit, and from those, it gets the precise blobs that should be matched to each location in the tree. It then loads the contents of those blobs into the proper file paths.

    To assist with this, it uses the index, which is a mapping of file states to paths in the directory tree, along with hashes of their content and a record of their last modification time. Git uses those hashes and mtimes to quickly identify which files need to be updated, and loads the proper contents.


    Any kind of work will take longer on a slower CPU+HDD, because it’s not specifically bound by time. It will use as much CPU/disk speed as possible. That said, Git is fairly efficient, so unless you have significant numbers of files or very large file content changes (or a very slow devices), it will generally go quite quickly.

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

Sidebar

Related Questions

i was wondering if there is a git command to see if a specific
I'm still new to all things git and was wondering what is best practice
When I try to rebase one of my branches onto another, git is not
I am wondering how I can target a specific commit SHA in Git for
I was wondering if it is, at all, possible to check if a git
I'm wondering if I can configure a remote FTP branch in git so that
Wondering if there is any way to get the lambda expressions that result from
Is it possible to create a Git repository that saves its objects into some
My .git file has grown to 229Mb and I wondering what the best way
I was wondering how to get git to allways show you the full file

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.