Last active
January 18, 2025 20:35
-
-
Save juan-medina/1713269669a921a12e40fb358d803b2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| branch1=$1 | |
| branch2=$2 | |
| diff=$(git diff $branch1 $branch2) | |
| commitMessage=$(cat <<EOF | |
| Generate a git commit message in the following format: | |
| - First line with a summary of the changes (max 50 characters) | |
| - Up to 10 lines describing the changes in detail (max 100 characters each) | |
| - Output the format as code for easy copy-paste, including line breaks | |
| The git diff between $branch1 and $branch2 is: | |
| $diff | |
| EOF | |
| ) | |
| echo "$commitMessage" | pbcopy | |
| echo "Commit message copied to clipboard." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| diff=$(git diff) | |
| commitMessage=$(cat <<EOF | |
| Generate a git commit message in the following format: | |
| - First line with a summary of the changes (max 50 characters) | |
| - Up to 10 lines describing the changes in detail (max 100 characters each) | |
| - Output the format as code for easy copy-paste, including line breaks | |
| The git diff is: | |
| $diff | |
| EOF | |
| ) | |
| echo "$commitMessage" | pbcopy | |
| echo "Commit message copied to clipboard." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment