Popular Python recipes tagged "git"http://code.activestate.com/recipes/langs/python/tags/git/2015-03-10T09:36:28-07:00ActiveState Code Recipesgit pre-commit hook to reject large files using Python (Python)
2015-03-10T09:36:28-07:00Albert-Jan Roskamhttp://code.activestate.com/recipes/users/4177640/http://code.activestate.com/recipes/578883-git-pre-commit-hook-to-reject-large-files-using-py/
<p style="color: grey">
Python
recipe 578883
by <a href="/recipes/users/4177640/">Albert-Jan Roskam</a>
(<a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/hook/">hook</a>, <a href="/recipes/tags/precommit/">precommit</a>, <a href="/recipes/tags/python/">python</a>).
Revision 9.
</p>
<p>This script should be saved in the templatedir, so it ends up in .git/hooks whenever you do a new git init.
By default, commits that contain files larger than 5 Mb are blocked. This is useful for preventing accidental large commits that are not caught by .gitignore. You can easily bypass the hook by specifing "--no-verify" with git commit. (in a previous version of this script, this did not work correctly)</p>
Patch/diff file viewer with highlighting (Python)
2010-10-29T10:48:15-07:00Anton Butanaevhttp://code.activestate.com/recipes/users/4175501/http://code.activestate.com/recipes/577436-patchdiff-file-viewer-with-highlighting/
<p style="color: grey">
Python
recipe 577436
by <a href="/recipes/users/4175501/">Anton Butanaev</a>
(<a href="/recipes/tags/cvs/">cvs</a>, <a href="/recipes/tags/diff/">diff</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/gui/">gui</a>).
Revision 4.
</p>
<p>diff shows difference in files in whole lines. Sometimes those lines are very similar, only one or two words changed. This script compares changed lines by characters and highlights actual differences in them.</p>
Update Source Directories (Python)
2009-07-21T23:40:53-07:00Alia Khourihttp://code.activestate.com/recipes/users/4169084/http://code.activestate.com/recipes/576853-update-source-directories/
<p style="color: grey">
Python
recipe 576853
by <a href="/recipes/users/4169084/">Alia Khouri</a>
(<a href="/recipes/tags/bzr/">bzr</a>, <a href="/recipes/tags/git/">git</a>, <a href="/recipes/tags/hg/">hg</a>, <a href="/recipes/tags/svn/">svn</a>, <a href="/recipes/tags/vcs/">vcs</a>).
</p>
<p>A convenience script to update a pre-specified folder containing
subversion, mercurial, bazaar, and/or git source folders</p>
<p>To use it: </p>
<ul>
<li><p>change the 'src' variable below to point to your source folder</p></li>
<li><p>name this script to something appropriate (I call it 'update')</p></li>
<li><p>put it into a directory on your PATH</p></li>
</ul>