updated readme to include add and show message
This commit is contained in:
parent
e6a3e9f16e
commit
ac0fc26960
59
README.md
59
README.md
@ -22,18 +22,67 @@ pip3 install git-changes
|
||||
|
||||
### Initializing
|
||||
|
||||
After installing run the below command in a git repo
|
||||
After installing run the below command in a **git repo**
|
||||
|
||||
```console
|
||||
gitc --init
|
||||
```
|
||||
|
||||
This command will change the default commit template so that we can add out own commit messages to it.
|
||||
It will also add the post-commit script.
|
||||
|
||||
|
||||
### Adding changes with messages
|
||||
|
||||
```console
|
||||
$ git addm file -m 'adding a new file' --type=fix
|
||||
[fix] adding a new file
|
||||
```
|
||||
|
||||
The `--type` is optional. The currently supported choices for `--type` are
|
||||
|
||||
```console
|
||||
$ git addm -help
|
||||
usage: gitc-add [-h] -m MESSAGE [--type {feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert}]
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-m MESSAGE, --message MESSAGE
|
||||
Message to add
|
||||
--type {feat,fix,docs,style,refactor,perf,test,build,ci,chore,revert}
|
||||
The type of the change
|
||||
```
|
||||
|
||||
|
||||
### Show Message
|
||||
|
||||
To list all the messages that will added to the next commit, run
|
||||
|
||||
```console
|
||||
$ git show-messages
|
||||
[fix] new hello file
|
||||
[fix] adding a new file
|
||||
[perf] fix some_function
|
||||
[refactor] change var name
|
||||
```
|
||||
|
||||
### Commit
|
||||
|
||||
In order to commit with all these message all you have to do is run.
|
||||
|
||||
```console
|
||||
$ git commit
|
||||
```
|
||||
This will open up commit message editor with all the set message for the current commit.
|
||||
|
||||

|
||||
|
||||
> NOTE: you cannot simply save and exit this file; since this is a template you have to make
|
||||
> some changes to it. I suggest adding a title that summarizes all these changes.
|
||||
|
||||
After a successful commit all the messages will be automatically removed.
|
||||
|
||||
```console
|
||||
$ git show-messages
|
||||
No commit messages yet!.. To add new message run
|
||||
git addm -m <message> [--type]
|
||||
|
||||
```
|
||||
|
||||
### Bye...
|
||||
|
Loading…
Reference in New Issue
Block a user