Reputation: 113
I have define few aliases in git. How can i using it in Intellij Idea 13.1?
For example:
file: common-configuration
[alias]
new-my-branch = !sh -c 'DATE=$(date +%Y%m%d) && BRANCH_NAME=\"my_super_branch/\"$0\"_\"$DATE && echo $BRANCH_NAME && git checkout -b $BRANCH_NAME && git push-upstream'
Upvotes: 3
Views: 3178
Reputation: 113
I resolve it that: change the terminal in Intellij Idea to
"P:\Program Files\Git\bin\sh.exe" --login -i
(CTRL+ALT+S -> Terminal -> past in Shell path: "C:\Program Files\Git\bin\sh.exe" --login -i)
In your local directory (e.g C:\Users\john smith)
open file and add:
[alias]
new-my-branch = !sh -c 'DATE=$(date +%Y%m%d) && BRANCH_NAME=\"my_super_branch/\"$0\"_\"$DATE && echo $BRANCH_NAME && git checkout -b $BRANCH_NAME && git push-upstream'
open new terminal in Intellij Idea and write:
git new-m[tab]
And you can see alias from auto-complete: git new-my-branch
Upvotes: 8