An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

![facebook_cover_photo_2](https://github.com/JunNishimura/Goit/assets/28744711/919d78ca-52bf-481d-883e-b17cf0b9ea69)


GitHub release (latest by date)
GitHub
test
Go Report Card

# 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)