You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ git cat-file -p bf8feb # -p is for pretty-print
In Xanadu did Kubla Kahn
I can find out what kind of Git object is with:
$ git cat-file -t bf8feb # -t is for type
blob
I can find out the size of Git object with:
$ git cat-file -s bf8feb # -s is for size in bytes
25
Git status doesn't detect anything yet
3. Growing a tree
Let's put the object in the staging area (index). 100644 is a magic number for permissions and I also have to specify to which file the content belongs to.
Let's checkout the file. The -- is a way for Git to apply the first part of the command only to some objects. We simply ask Git to take out the file coleridge.txt and put it into the working directory.
$ git checkout -- coleridge.txt
Now status is happy and we can see the file in the folder