diff --git a/doc/Could not compile C.md b/doc/case studies/Could not compile C.md similarity index 100% rename from doc/Could not compile C.md rename to doc/case studies/Could not compile C.md diff --git a/doc/Discards qualifiers.md b/doc/case studies/Discards qualifiers.md similarity index 100% rename from doc/Discards qualifiers.md rename to doc/case studies/Discards qualifiers.md diff --git a/doc/cat-file.md b/doc/commands/cat-file.md similarity index 94% rename from doc/cat-file.md rename to doc/commands/cat-file.md index 7301422..0d81aad 100644 --- a/doc/cat-file.md +++ b/doc/commands/cat-file.md @@ -4,7 +4,6 @@ From: https://wyag.thb.lt/#objects ## Commands -`git hash-object` - converts an existing file into a git object `git cat-file` - prints an existing git object to standard output. ## Git Objects diff --git a/doc/commands/hash-object.md b/doc/commands/hash-object.md new file mode 100644 index 0000000..074bc01 --- /dev/null +++ b/doc/commands/hash-object.md @@ -0,0 +1,14 @@ +# hash-object + +## Commands +`git hash-object` - converts an existing file into a git object + +## What it does + +It takes in a file in the git repository, compresses it to a Git blob, and generates a SHA-1 hash from the contents. + +There is an option for users to write the object into the git repository. + +## Related commands + +[cat-file](cat-file.md) \ No newline at end of file diff --git a/doc/init.md b/doc/commands/init.md similarity index 69% rename from doc/init.md rename to doc/commands/init.md index 843024b..84cbd00 100644 --- a/doc/init.md +++ b/doc/commands/init.md @@ -1,6 +1,6 @@ # init -Git init creates a repository. +`git init` creates a repository. ## Command usage @@ -9,7 +9,8 @@ Git init creates a repository. ## Implementation details -1. Initialise a GitRepository object +1. App representation: Initialise a `GitRepository` object, which is an in-memory representation of an actual git repository +2. This object will create actual files that represent a git repository ## Git repository