For instance, commit SHA1, the author, commit message, and timestamp. The commit object has comprehensive information about the changes. On committing a file, git creates a commit object to reference the tree object. A branch is a named reference to a commit.ĪLSO READ: git remote add explained Inside the refs folder are the heads and tags. Refs is a convention for referring to branches and tags. git subdirectory, the object's directory stores three objects' SHA1s and other metadata. Lastly, a commit object references a tree object. The tree object references blobs and other trees. Git tracks changes using three object types: blob, tree and commit.A blob contains file contents. Understand git internals to picture how an object can be unreachable. It would be best to deeply understand the concept of orphaned objects before applying git prune. , & git rev-parse -all)Īpart from removing unreachable objects, you can apply git prune as an option in fetch and remote commands to discard outdated branches and refs to the remotes. Additionally, you can remove unused objects or those borrowing objects from your repository with the git prune and the rev-parse commands.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |