Skip to main content

git/gup

1#!/usr/bin/env bash
2# This opens my current working directory as a Git repository in GitUp,
3# my Git GUI of choice (https://gitup.co/).
4#
5# It finds the top level of the Git repository, then opens that, rather
6# than the current working directory -- if you run `open -a GitUp.app .`
7# in a subdirectory of a Git repository, you get an error:
8#
9# could not find repository from '/git/repository/subdirectory'
11# This could be easily adapted to open a different Git GUI.
13set -o errexit
14set -o nounset
16_ensure_ssh_key_loaded
18open -a GitUp.app "$(groot)"