/openInGitX

OS X toolbar script to open folders in GitX. Modified openInTextMate.app by Henrik Nyh, http://henrik.nyh.se/2007/10/open-in-textmate-from-leopard-finder

Primary LanguageAppleScript

openInGitX

OS X toolbar script to open folders in GitX. Modified openInTextMate.app by Henrik Nyh, http://henrik.nyh.se/2007/10/open-in-textmate-from-leopard-finder

This is a fork of perifer's version at [https://github.com/perifer/openInGitX][], updated to work on more recent versions of macOS. Parts of this README are based on an earlier version I can't find online anymore.

PREREQUISITES

  • You must have a recent version of GitX installed to either /Applications/GitX.app or ~/Applications/GitX.app

I recommend brotherbard's fork of GitX:

https://github.com/brotherbard/gitx/downloads
  • You must open GitX manually (by double-clicking the application) at least once, to overcome the "This application was downloaded from the internet..." dialog.

INSTALLATION

Catalina (macOS 10.15) or later:

  1. Place the "OpenInGitX" application in "/Applications" or "~/Applications"

  2. Hold the Option and Command keys down (OPT+CMD), while you click and drag the "OpenInGitX" Application to the Finder toolbar. A small "+" sign badge should appear over the icon you are dragging, and when you release, a copy should appear in the toolbar.

  3. Profit!

How To Use

While viewing a folder in the Finder that is a git repository, click on the shortcut in the toolbar to open the repository in GitX.

Opens the currently selected Finder files, or else the current Finder window, in GitX. Also handles dropped files and folders.

TROUBLESHOOTING

The Application won't start and has a circle with a line through it over the icon

The Application is not supported on your version of OS X or macOS. But it is very easy to build a version for your OS: it is really just an AppleScript.

  1. go to the source directory in this repository

  2. open the 'OpenInGitX.applescript' file in Script Editor

  3. Use the menu command: File > Export ... and select 'Application' from the File Format drop-down option. Save the exported copy somewhere you can find it again.

  4. If you want to change the icon of the application:

    1. open the 'droplet.icns' file in preview,
    2. copy (CMD-C or 'Edit > Copy'),
    3. select the application in the Finder
    4. 'File > Get Info' (CMD-I)
    5. select the icon in the info window
    6. Press 'CMD-V' (Paste).
    7. Close the info window and the icon file in Preview.

GitX bounces in my dock forever but does not open

It's probably because MacOSX wants to prompt you if it's OK to open an app downloaded from the web, but the prompt is unseen due to the method we are launching GitX. Follow the prerequisite step by opening GitX manually once.