Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devpolo/gac
One simple command to format and faster your git add and git commit actions.
https://github.com/devpolo/gac
bash git zshrc
Last synced: 3 months ago
JSON representation
One simple command to format and faster your git add and git commit actions.
- Host: GitHub
- URL: https://github.com/devpolo/gac
- Owner: devpolo
- License: mit
- Created: 2021-05-10T15:12:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-04T13:34:34.000Z (over 2 years ago)
- Last Synced: 2024-04-14T06:51:46.132Z (7 months ago)
- Topics: bash, git, zshrc
- Language: Shell
- Homepage: https://paul.crussaire.com
- Size: 152 KB
- Stars: 160
- Watchers: 4
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![format and faster your commits](static/gac.svg "format and faster your commits")
# Format and faster your git commit
A customizable bash function to **format** and **faster** your `git add -A && git commit -m "message"` command.
## Example
```bash
gac f call to action button# equals to:
git add -A
git commit -m "feat: call to action button"
```## Contributions
1. Give this project a ⭐️
2. Pull requests and issues are most welcome## Quickstart
### macOS
1. You need a `~/.zshrc` file
2. Open or create it: `vim ~/.zshrc`
3. Enter insert mode: `i`
4. Past the entire [`gac.sh`](gac.sh) file (or a [variant](variant/shell)) at the end of your `~/.zshrc` file
5. Exit vim: `:wq`
6. Restart your terminal
7. Enjoy faster and formatted `git add` and `git commit` actions### Linux
Work the same as [macOS](#macos). Use `~/.profile` file instead.
### Windows (only in Powershell)
1. Run your PowerShell as administrator
2. Give access to external script: `Set-ExecutionPolicy Unrestricted`
3. Go to Powershell Home Directory `cd $PSHOME` or `cd C:\Windows\System32\WindowsPowerShell\v1.0`
4. Open explorer in $PSHOME `start .`
5. Copy `Profile.ps1` file (or a [variant](variant/powershell)) or paste the `Profile.ps1` contents if it already exists.## Available commands
```bash
gac
# print available semanticsgac c
# git add -A && git commit -m "chore: "gac d
# git add -A && git commit -m "docs: "gac f
# git add -A && git commit -m "feat: "gac r
# git add -A && git commit -m "refactor: "gac s
# git add -A && git commit -m "style: "gac t
# git add -A && git commit -m "test: "gac x
# git add -A && git commit -m "fix: "gac
# git add -A && git commit -m ""
```## Thanks
[Inspired by Lenar Hoyt's stackoverflow post](https://stackoverflow.com/a/45612441/11692562)
[Inspired by the Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#type)
[Graphical charter inspired by Ory](https://github.com/ory)