From: Jeff King Date: Sat, 22 Mar 2008 16:57:37 GMT Subject: Re: How to rewrite author history Message-ID: <20080322165737.GB7611@coredump.intra.peff.net> In-Reply-To: <216e54900803220611v5aa5e9d5q86da249480be3c91@mail.gmail.com> On Sat, Mar 22, 2008 at 06:11:12AM -0700, Andrew Arnott wrote: > git-filter-branch --env-filter ' > [...] > And I did this for master, and my v1 and v0.1 branches. I'm concerned > though, that since I changed the names of all the objects by doing > this, did I somehow make my branches incompatible with each other? > Will there be any problems in the future sharing commits or merging > across branches as a result? There are two concerns, and I'm not sure which you have (I think number 1): 1. Your branches within the repository will not connect anymore. I believe this is a non-issue with your filter, since the generated commit IDs are deterministic. Certainly a toy case worked for me with: for i in master branch; do git filter-branch --env-filter=... $i done You can also specify both to be done at the same time, which is more efficient: git filter-branch --env-filter=... master branch You can check the graph structure with "gitk master branch" which should show them connecting. 2. Your branches are now a different, rewritten history compared to anyone who has cloned or fetched from you. This is unavoidable, and the answer is either "don't use filter-branch" or "tell everyone to rebase their work on the new history." So the best time to filter-branch is right after import, but before you start work. -Peff