Search code examples
gitgit-fast-import

How to use git fast-import committer command?


I have created a git repository using git fast import. I want to update committer information of a single file in it. How to update the committer info of the single file?


Solution

  • Remember that each change in git depends on the previous commit, which depends on the previous commit, and so forth. Making one author/committer change early in your history will cause every commit hash from that point forward to change.

    If making an author/committer change to an existing repository, you could use git filter-branch or a variety of other options to adjust the commit in question and all commits that come after it. You'd need to do so with coordination to everyone else using the repository, because any existing work they're doing would need to be adjusted to point only to your new (rewritten) commits, not to the commits from before the rewrite.

    Because of the degree of rewriting involved, and because your repository is so new, I'd recommend re-importing paying attention to the "author" and "committer" lines on the git fast-import commit documentation.