By accident I checked 60-odd full-size photographs into the git history of my website. I shrunk them in a next commit, but the history was still there leading to a bloated .git directory. This took a lot of time when making backups. This documents how I cleaned up this mess.
Articles tagged with "git"
This article describes how to use cvs-fast-export to convert old RCS histories to git.
Since I am in the process of making most of my programs available on github, I have been re-shuffling the some git repositories. Especially my collection of scripts (small programs for different purposes). Because some of those scripts are private, I don’t want to publish that repository as a whole.
One of the things I liked about the old rcs revision control system was that it supported keyword expansion in files. Unlike systems like rcs, cvs and subversion, the git revision control system cannot provide keyword expansion. The cause for this is that you can’t modify a file with ...
Create a directory for the new project:
mkdir newproject cd newproject
Initialize for git:
Tell git which types of files to ignore, e.g. compiled Python files:
printf '*.pyc\n*.pyo' >.gitignore
Using filters we can change do keyword expansion during check-out. A filter named kw is defined ...
This shell-script makes a backup (with the tar program) of the directory from which it is called, with all its contents. It is one of the smallest scripts I’ve ever written but I’ve found it really useful to make fast complete backups of e.g. source archives.
This scripts looks for all directories in the users’ home directory that are managed by the git revision control system (i.e. that have a .git subdirectory).
For each of those directories it checks whether there are uncommitted changes by running git status. If there aren’t any, it runs ...
Configuration files for UNIX-like systems and the programs that run on them are usually plain text files. They tend to come in two flavors;
- System files
- These files live in /etc or /var or /usr/local/etc and control the running of the system and additional software, for all ...