Note: This is purely learning purpose post
I am going to use git init
to create a git repository in my local, and here it is
Notice here I have .git and object folder, which will be used to store snapshot of my commits and staging.
Now I will go ahead and add one new file i.e. stage file1, and notice it creates one object with hash code for the stage
Now this object is a reference for what will be committed, but if I delete this object
and run git status
, git still shows file1 as staged but actually there is not object reference now for that
file1 is still there with the same changes but actually git cant not commit that as no object found but why git still shows file1 as staged or ready for commit
what is the reference for git status
here ?