Override git commands to add magic. Create branches and commit messages based in the issue key.
- Clone the repository
git clone [email protected]:SebastianGoral-freenet/git_commands.git
- Install dependencies:
pip install -r requirements.txt
- Add init script to .bash_profile:
echo "source PATH_TO_REPOSITORY/init.sh" >> ~/.bash_profile"
- Add JIRA credentials to
~/.jiratoken
in the formatusername:api-token
5. An API token can be generated at https://id.atlassian.com/manage-profile/security/api-tokens - Open a new shell
The following commands are currently available:
Usage: git create-branch $issue
Creates a new branch with the issue key and summary.
Examples:
git create-branch 123
creates a branch for GRAON-123git create-branch ERP-123
creates a branch for ERP-123
Usage: git commit $any-normal-git-commit-options
Commit the staged changes with a commit message template based in the issue key and summary of the current branch.
Requires an issue key in the branch name (e.g. feature/GRAON-123-this-is-an-issue
).