I use Git to version-control my writings and software.
I tend to use Git both on the command-line as well as in Vim using fugitive.vim and gv.vim. I also tend to look through commits and other information on GitHub (
:Gbrowse makes it easy to go directly from Vim to the listing on GitHub).
For my Git configuration, see my
.cvsignore (global ignore file).
Some useful commands
View all unadded files, including ones in
-n: dry run;
-f: force files in
See this question.
Dealing with submodules
Check when the last revision date for a page on this site was last modified:
I’m documenting some weird behavior I’ve observed.
git diff --color 3cc00f112bf~1 3cc00f112bf in the CP Wiki repo. This causes colors to show up, but the header doesn’t show up at first. If you hit
G to go to the bottom, then hit
g to get back up, you can see the header. You can do some pretty weird things with this, e.g.
git diff --color 3cc00f112bf~1 3cc00f112bf | fold | less -r will make the color fade out in some regions, and you can also see strange character marks.
- Software for more about the software I use