Ever been tempted to click the Gist it button? Or maybe you accidentally did click it, only to find out…
The attempt will be made without any confirmation on your part.
So, what if you don’t want to upload your commit?
Well, you could just make sure never to click the ‘Gist it’ button.
Or you could disable the button from within the preferences, and flip it back on when you do want to Gist something.
Here’s how to add a confirmation message for when the ‘Gist it’ button is clicked
fyi. This is a really quick and semi-dirty hack that will be lost if you re-install or download a new version of GitX.
- Open Finder > Application, ctrl (right) click the GitX application and select ‘Show Package Contents’.
- Navigate to ‘Contents/Resources/html/views/history/’ and open ‘index.html’ in TextMate or other plain text editor.
- Add the following within the head tags:
- Update the ‘Gist it’ button to look like:
- Save the changes made then quit (if open) and re-launch GitX.
Now, whenever you click the ‘Gist it’ button, a notification message will appear within the notification_message div (The same place as ‘Gist it’ status notifications):
confirm_gist() also takes an optional string which can be used to alter the confirmation link, like so:
Re-installing or upgrading GitX will wipe this ‘hack’ which is why I didn’t alter the gistie() method in the history.js file. Altering as little as possible, and only the index.html file makes it a bit easier to ‘track’ and save if a feature like this is not implemented in future releases.
You can alter or add to the stylings by adding to the stylesheets found in Contents/Resources/html/css/
Also see GitX’s Lighthouse ticket on this very matter: #58 Suggestion: Usability of “Gist It” button. As of this post (16 March 2009), and GitX ver. 0.6.1, this ticket is still open and clicking ‘Gist it’ will upload your commits to gist.github.com without confirmation.