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 6807077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:47:17+00:00 2026-05-26T19:47:17+00:00

In Pro Git the author says that Git staging is just a file storing

  • 0

In Pro Git the author says that Git staging is just a file storing which files go towards next commit. Then how does Git remember the contents of a file in staging area, even after that file is again modified in working directory?

E.g.

  1. edit myFile
  2. git add myFile
  3. edit myFile

Now, upon commit Git checks in the file as in step 2. How does it remember the contents of file in staging, if staging is just a file marking? Does it also store file contents, upon staging instead of just the file marking?

  • 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-26T19:47:18+00:00Added an answer on May 26, 2026 at 7:47 pm

    Does it also store file contents, upon staging instead of just the file marking?

    Yes, it must necessarily do so to allow you to diff the file in the working directory with the file in the index. git add doesn’t simply “mark files for commit”, it adds the content of the file to the index, so the content of the file can be added to the next commit. Content is all Git can track, that’s how it works: It tracks the content of files.

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

Sidebar

Related Questions

Why on all images that show queue of commits in Pro Git book arrows
Have a SomeLib.pro file that contains: CONFIG += debug TEMPLATE = lib TARGET =
In Pro Git Scott Chacon gives some nice examples of some alias which might
I understand that git diff compares a staged file and modified but not staged
So, from what I've read in Pro Git, It turns out that Git stages
In VisualStudio (Pro 2008), I have just noticed some inconsistent behaviour and wondered if
What does Pro have that's not in Standard (or vice-versa)? I need Visual Studio
I recently installed W7 pro 64bits on my laptop, and then VS2008 pro with
I understand the scenario presented in Pro Git about The Perils of Rebasing .
So i've got something like this for a repository atm. D-Hewards-MacBook-Pro:project dheward$ git branch

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.