https://github.com/junnishimura/goit
Git made by Golang
https://github.com/junnishimura/goit
cli git go
Last synced: over 1 year ago
JSON representation
Git made by Golang
- Host: GitHub
- URL: https://github.com/junnishimura/goit
- Owner: JunNishimura
- License: mit
- Created: 2023-03-30T14:29:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-18T14:14:18.000Z (over 1 year ago)
- Last Synced: 2025-02-18T15:26:31.721Z (over 1 year ago)
- Topics: cli, git, go
- Language: Go
- Homepage:
- Size: 363 KB
- Stars: 12
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Goit - Git made by Golang
## ๐ Overview
Goit is a version control tool just like Git made by Golang.
## ๐ป Installation
### Homebrew Tap
```
brew install JunNishimura/tap/Goit
```
### go intall
```
go install github.com/JunNishimura/Goit@latest
```
## ๐จ Commands
### Available
- [x] `init` - initialize Goit, make .goit directory where you init
- [x] `add` - make goit object and register to index
- [x] `commit` - make commit object
- [x] `rm` - remove from the working tree and the index
- [x] `branch` - manipulate branches
- [x] `switch` - switch branches
- [x] `restore` - restore files
- [x] `reset` - reset HEAD to the specified state
- [x] `status` (**NEW FEATURE๐**) - show the working tree status
- [x] `log` - show commit history
- [x] `reflog` - show reference log
- [x] `config` - set config. e.x.) name, email
- [x] `cat-file` - show goit object data
- [x] `ls-files` - show index
- [x] `hash-object` - show hash of file
- [x] `rev-parse` - show hash of reference such as branch, HEAD
- [x] `update-ref` - update reference
- [x] `write-tree` - write tree object
- [x] `version` - show version of Goit
### Future
- [ ] tag
- [ ] checkout
- [ ] merge
- [ ] stash
- [ ] revert
- [ ] diff
- [ ] read-tree
- [ ] symbolic-ref
- [ ] cherry-pick
- [ ] rebase
## ๐ How to use
### 0. Install Goit
see Installation above.
### 1. Move to the directory you want to use goit
```
cd /home/usr/sample
```
### 2. Initialize Goit
```
goit init
```
### 3. add test.txt
```
echo "Hello, World" > test.txt
```
### 4. run `add` command to convert text file to goit object
```
goit add test.txt
```
### 5. run `config` command to set config
```
goit config --global user.name 'Goit'
goit config --global user.email 'goit@example.com'
```
### 6. run `commit` command to make commit object
```
goit commit -m "init"
```
### 7. look at inside commit object
```
goit rev-parse main
goit cat-file -p `hash`
```
Perfect!! You now understand the basic of goit๐
## ๐ชง License
Goit is released under MIT License. See [MIT](https://raw.githubusercontent.com/JunNishimura/Goit/main/LICENSE)