commit git project with golang cobra commands. format changed go source files.
go install github.com/go-mate/go-commit/cmd/go-commit@latest
cd project-path && go-commit -m 'message' --format-go
Can also add alias:
alias gcm='go-commit --username=yangyile --format-go'
alias gca='go-commit --username=yangyile --format-go --amend'
Can use gcm
to commit all changes with a message and format Go source files:
cd project-path
gca -m message
Can use gca
to amend the last commit with a message and format Go src files:
cd project-path
gca -m message
MIT License. See LICENSE.
Contributions are welcome! To contribute:
- Fork the repo on GitHub (using the webpage interface).
- Clone the forked project (
git clone https://github.com/yourname/repo-name.git
). - Navigate to the cloned project (
cd repo-name
) - Create a feature branch (
git checkout -b feature/xxx
). - Stage changes (
git add .
) - Commit changes (
git commit -m "Add feature xxx"
). - Push to the branch (
git push origin feature/xxx
). - Open a pull request on GitHub (on the GitHub webpage).
Please ensure tests pass and include relevant documentation updates.
Welcome to contribute to this project by submitting pull requests and reporting issues.
If you find this package valuable, give me some stars on GitHub! Thank you!!!
Thank you for your support!
Happy Coding with this package! 🎉
Give me stars. Thank you!!!