Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhexists authored Dec 23, 2023
1 parent 3fa778c commit 738ffb0
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,48 @@ cargo build --release
export PATH="$PATH:/home/jerry/Desktop/vault/target/release"
```
4) You are now all set to "VAULTIFY" your local files :)

# Commands
1) To initialize a new vault instance in your present working directory.
```
vault init
```
2) To create a new commit.
```
vault commit -m "Your Commit Message"
```
Parameter ` -m ` or ` --message ` is optional. It would take an empty message by default if no message is provided.

3) To create a new branch.
```
vault create branch_name
```
4) To revert commits (get back to a previous point of directory)
```
vault revert -l "No. of commits" "dir_name"
```
- Parameter ` -l ` or ` --level ` defines the number of commits to go back.. For eg. -l 2 would go back 2 commits in the repository. If nothing is provided , default vaule would be taken as 1.

- ` dir_name ` requires a directory name in which the files would be added. If nothing is provided, it would replace the files of the current directory..

For eg. for `vault revert -l 2 hello`, a new directory would be created namely `hello`, that would have the files 2 commits ago..

5) Delete a Branch
```
vault delete branch_to_delete
```
6) Switching to another branch ( git checkout )
```
vault switch branch_to_switch
```
7) Logs of the current branch
```
vault log
```
Note - Output of vault log just consists of the logs of current active branch.

![Output of vault log](https://github.com/shubhexists/vault/assets/110319892/49e44032-dbcb-4741-b86d-7ca54a7d8a42)
8) (Mainly For Debugging Purposes) To read the contents of a Zlib compressed binary
```
vault cat hash_string_to_read
```

0 comments on commit 738ffb0

Please sign in to comment.