Initializes the git object by creating the folders
Hashes the given file and returns the SHA-1 encrypted 40 character token.
./git hash-object -w demo.txt
- 8abf6b621d1b9baafe18f163d37a6736a63ae414
It provides the content of the the hashed value that gets generated by the #hash-object
./git cat-file -p 8abf6b621d1b9baafe18f163d37a6736a63ae414
- Returns the content Hello this is Rajesh Bhusal
List the contents of a given tree object in the working directory
./git ls-tree --name-only cf3cfbf46ea8b55baad6beec4463a9e1d2a0bb99
It returns all the files and folders of the current directory
Creates a tree object from the current state here there is no stagging area so considering here all working directory is considered as stagging area
./git write-tree
It returns the 40 character long SHA 1 token of the current working directory
Returns the information about the commit it gives information is
- committed author name
- Timestamp
- Tree Sha
- Parent Commit
It returns information like this
author Rajesh [email protected] 1713769157605 -345 committer Rajesh [email protected] 1713769157605 -345 Message