GitAutoCommit
Enables auto-commit for selected Git repos (install Git plugin first)
Details
Installs
- Total 5K
 - Win 3K
 - Mac 1K
 - Linux 1K
 
| Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
Readme
- Source
 - raw.githubusercontent.com
 
Installation
- Install Package Control if you don't have it yet
 - Install 
Gitplugin (required) 
Shift + CMD + P -> Install Package -> Git
- Install 
GitAutoCommit 
Shift + CMD + P -> Install Package -> GitAutoCommit
Why auto-committing anything at all?
I like using Sublime Text as a buffer for:
- working with text from clipboard,
 - or writing random notes in the way only I can understand
 
Such notes usually change a lot during a day, and I often need to find a piece of text I had in there.
This little plugin helps tracking a history of such notes automatically. It stores the history in a Git repo.
How it works?
You create new Git repo for your notes with an empty file .sublime-text-git-autocommit.
This way plugin knows that it should enable auto-commits for files in this repo.
Changes committed when you either: * saved a file in your Git repo, * or after you made changes to the files (in a 30 seconds delay).
Every changed file added & committed separately with commit message like:
Auto-committing 'TODO.txt'
How to use?
- Create new Git repository for your temporary files
 
mkdir ~/Documents/Notes
cd ~/Documents/Notes
git init
- Add empty file with name 
.sublime-text-git-autocommitto the root folder to activate this plugin 
touch .sublime-text-git-autocommit
git commit -am "Commit .sublime-text-git-autocommit"
- Create one or more text files at the same folder and make your notes in them
 
touch TODO
touch Clipboard
- All changes made via Sublime to these files will be committed automatically (nested folders ignored)
 
How to view history?
Use git log -p.
Or publish your repo as GitHub Gist and use its diff viewer.
To publish as GitHub Gist:
- Create new private Gist
 - Copy git clone URL
 - From the root folder of your git repo
 
git remote add origin https://gist.github.com/YOUR_GIST_ID_HERE.git
git remote -v
git branch --set-upstream-to=origin/master master
git pull
- Push your changes to Gist manually from time-to-time
 
“Shift+CMD+P” -> type “Git Push” -> Enter 5. View diffs on GitHub
GitHub 2FA
If you enabled GitHub's 2-Factor Authentication then you need to use access token to push to your Gist repo from command line.
I found Gist Tool helpful for this purpose.
brew install gist
gist --login
cat ~/.gist
Once you have your access token use it as a username when GitHub asks for credentials, leave password empty.
License
How to contribute?
- Fork it
 - Create your feature branch (git checkout -b my-new-feature)
 - Commit your changes (git commit -am 'Add some feature')
 - Push to the branch (git push origin my-new-feature)
 - Create New Pull Request