When I started my git repo I commited a few files as initial commit to it. Now, many commits later, I noticed that I included in those files a line with information which I do not want to publish (unlike the rest of the code). So I want to **remove/change this one line** and **keep the rest** of the code.

Searching around I found this solution: Insert an empty commit as initial commit (described here: [Insert a commit before the root commit in Git?](https://stackoverflow.com/questions/645450/git-how-to-insert-a-commit-as-the-first-shifting-all-the-others)), do a rebase on it and then edit the old first commit via amend. Unfortunately, many cruel merge conflicts arise during rebase (as described here: [git: solving conflicts caused by rebase](https://stackoverflow.com/questions/7194023/git-solving-conflicts-caused-by-rebase/7194301#7194301)).

Is there a different way to solve my problem or do have to rebase and edit all conflicts by hand?

Thanks in advance :)