Created
July 4, 2015 14:25
-
-
Save anildigital/78c882a48b46d140cfac to your computer and use it in GitHub Desktop.
Git Object Model - Commands used
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints unique sha1 for the file | |
git hash-object data/number.txt | |
#Lists commit object ids | |
git rev-list --objects —all | |
# Lists out the git objects | |
find .git/objects -type f | |
# Lists files added to git index | |
git ls-files --stage | |
# Prints out the type of object | |
git cat-file -t 0858981994133d5893a4565fc7a84ffab6409007 | |
# Prints out the contents of the object | |
git cat-file -p 0858981994133d5893a4565fc7a84ffab6409007 | |
# Prints out the contetns of the blob | |
git cat-file blob 0858981994133d5893a4565fc7a84ffab6409007 | |
# Writes the tree. Creates a tree object | |
git write-tree | |
# Creates a git commit object from the tree. | |
echo "msg" | git commit-tree 0858981994133d5893a4565fc7a84ffab6409007 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment