Last active
March 13, 2025 01:32
-
-
Save dersam/0ec781e8fe552521945671870344147b to your computer and use it in GitHub Desktop.
Open GitKraken using the current repo directory in the cli.
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
## Open GitKraken using the current repo directory. | |
## For when you want a prettier view of your current repo, | |
## but prefer staying in the cli for most things. | |
## This will break if GitKraken ever removes the -p flag. | |
## If you're not using OSX, the path is definitely different. | |
kraken () { | |
~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd) | |
} | |
# If you want a git alias, add the following to your git config under [alias] | |
kraken = !"~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd)" | |
# Now you can 'git kraken'! |
https://gist.github.com/dersam/0ec781e8fe552521945671870344147b#gistcomment-3453223
I made this Quick Action using your logic, it worked just fine
I will share to you the exported files:
Link: https://github.com/rbatty19/mac-os-automators/
more info:
https://stackoverflow.com/questions/70815538/open-with-shortcut-quick-action-for-vs-code-git-kraken
https://stackoverflow.com/questions/64040393/open-a-folder-in-vscode-through-finder-in-macos
I added this to my .bashrc
and it works like a charm in any directory inside a git repo you might be
function kraken() {
open -na 'GitKraken' --args -p $(git rev-parse --absolute-git-dir)
}
I added this to my
.bashrc
and it works like a charm in any directory inside a git repo you might befunction kraken() { open -na 'GitKraken' --args -p $(git rev-parse --absolute-git-dir) }
work to me
to anyone else who stumbles on this. to handle dirs with spaces:
alias kraken="open -na 'GitKraken' --args -p \"$(git rev-parse --absolute-git-dir)\""
alias gk="kraken"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
--new-window
works like charm!