Skip to content

Update documentation #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion doc/cat-file.md → doc/commands/cat-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions doc/commands/hash-object.md
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 3 additions & 2 deletions doc/init.md → doc/commands/init.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# init

Git init creates a repository.
`git init` creates a repository.

## Command usage

Expand All @@ -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

Expand Down
Loading