リポジトリの履歴を書き直す必要があります。私はコミットルートを修正する必要があるように私はGit Faqからの指示に続く:Gitは、すべてのブランチのルートコミットを編集します。
git rebase -i
を使用すると、便利なルートがコミットを除く、以前のコミットを編集することができます。次のコマンドは、これを手動で行う方法を示しています。# tag the old root git tag root `git rev-list HEAD | tail -1` git checkout -b new-root root # edit... git commit --amend # check out the previous branch git checkout @{-1} # replace old root with amended version git rebase --onto new-root root # cleanup git branch -d new-root git tag -d root
私の問題は、私はすでにリポジトリに二つの枝と複数のタグを持っていると私は私の歴史書き換えがあまりにもそれらに適用することを希望することをにもかかわらずです。レポはまだ公開されていないので問題はありません。前にsimilar questionに尋ねましたが、その場合はgit rebase
コマンドが使用されていませんでした。私のレポの基本グラフは次のとおりです。
+ master branch
|
| + topic branch
| |
| |
+---+
|
|
|
+ TAG
|
+ Initial commit, the commit I'd like to amend for all branches
それは可能ですか?
おそらく関連しています:[Gitの最初の/ root/initialコミットの編集/修正/変更/変更](http://stackoverflow.com/q/2119480/456814)。 –