Python script for automatic synchronization based on inotify

Chanoch (Ken) Bloom kbloom at gmail.com
Mon Mar 14 21:53:44 CET 2011


On Mon, Mar 14, 2011 at 08:53:03PM +0100, Rene Mayrhofer wrote:
> On 14.03.2011 17:15, Dieter Plaetinck wrote:
> >why are many code changes committed as "autocommit"? why do you
> >commit .pyc files?
> .pyc removed from history with --force push to gitorious done.
> However, my git-fu is not yet good enough to properly change the
> past commit messages and merge them for a cleaner history. If you'd
> like to have a go at, I would welcome a clean history and could
> (probably as the owner of the project) do another force push to get
> it on gitorious.

I just took a look at your repository, and here's how to fix it.

First, run `git filter-branch` with the `--prune-empty` option to get
rid of the empty commits that used to contain only changes to the .pyc
file.

Second, rewriting the history to be sane should be a simple (though
potentially time consuming) application of `git rebase --interactive`.
Look over the tree using gitk to see which commits can be grouped into
logically related sets of changes, then find the number of the first
commit on the repository (or the first commit where the history starts
to get really hairy) and start rebasing from there. Make liberal use
of the `squash` operation to merge commits that should be related but
were broken up by the way autocommit works. Write a useful commit
message for each of the new commits you're creating.

When you're done, look over the tree again with gitk. You can run `git
rebase --interactive` again (on the rebased tree) if you spot errors.

--Ken

-- 
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/


More information about the vcs-home mailing list