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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:38:34+00:00 2026-05-23T12:38:34+00:00

According to this page http://www.eecs.harvard.edu/~cduan/technical/git/git-1.shtml A commit object contains three things: A set of

  • 0

According to this page
http://www.eecs.harvard.edu/~cduan/technical/git/git-1.shtml

A commit object contains three things:

  • A set of files, reflecting the state of a project at a given point in time.
  • References to parent commit objects.
  • An SHA1 name, a 40-character string that uniquely identifies the commit
    object. The name is composed of a hash
    of relevant aspects of the commit, so
    identical commits will always have the
    same name.

My question is regarding first point:
If my current project size is 10MB , so adding a new commit will take another 10MB ? since according to first point each commit contains set of files reflecting project state.

  • 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-23T12:38:35+00:00Added an answer on May 23, 2026 at 12:38 pm

    I’m not sure the other answers have really addressed your question completely.

    Git stores commits and actual file contents separately. A commit doesn’t contain files — it contains references to the hashes of files that the commit contains. Files are stored separately from commits, and if two commits have the same version of a file, both of those commits will refer to the same hash, but the file itself is not duplicated. If a file changes between commits, the file is stored twice, each version of the file has its own hash, and the commits will refer to different hashes.

    Say you start with one commit, which contains two files, a.txt and b.txt, each of which hashes to a different value:

    Commit 1:
    Filename    |    Hash
    ---------------------
    a.txt       | abcdef111111
    b.txt       | ghijkl222222
    

    Note that the commit does not contain the file contents. Git has stored the contents of the files, and the hashes, elsewhere.

    File store:
    Hash         |    File contents
    ---------------------------------
    abcdef111111 | hello world
    ghijkl222222 | int main()
    

    Say you update a.txt, and make a new commit. First, Git stores the new version of the file in its store of file contents:

    File store:
    Hash         |    File contents
    ---------------------------------
    abcdef111111 | hello world
    ghijkl222222 | int main()
    zyxwvu999999 | goodbye world     <-- new entry
    

    And the new commit points to that hash as containing the contents of a.txt:

    Commit 2:
    Filename    |    Hash
    ---------------------
    a.txt       | zyxwvu999999
    b.txt       | ghijkl222222
    

    Since b.txt did not change, there was no need to store it again. The second commit just refers to the same hash as the first commit.

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

Sidebar

Related Questions

I've got this ruby script: require 'mechanize' agent = Mechanize.new page = agent.get http://www.speech.sri.com/projects/srilm/download.html
I am using following a tutorial from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/ This is the script I
According to this answer: Invoking JavaScript code in an iframe from the parent page
the specific example i am referring to is this site http://www.iamextreme.net/category.php?CategoryId=1&SubCategoryId=0&SortBy=name notice the sort
According to the document, http://www.playframework.org/documentation/1.2.3/configuration#java if I define java.source in conf/application.conf then I should
Please have a look at this beautiful website : http://www.snipe.net/ If you are using
I've created a custom component that display some data to the page according to
I don't think this is not another resize iframe according to content height question.
I am trying to make a proxy server that gets a page from www.xxx.com
I am expecting to implement a work flow like this. Browse facebook Canvas Page

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.