0

1つにマージしたい4つのコミットがあります。これが後に現れるものrebase -iです:

pick 43b00e2 test2
pick f046962 Fixed files refreshing forever when list is empty
pick 92788fb Fixed files refreshing forever when list is empty
pick aef642a fuckgit

次のように変更すると:

pick 43b00e2 test2
squash f046962 Fixed files refreshing forever when list is empty
squash 92788fb Fixed files refreshing forever when list is empty
squash aef642a fuckgit

私はこれを手に入れます:

D:\Users\Steven\Documents\projects2\Put.io [master]> git rebase -i
warning: LF will be replaced by CRLF in res/drawable/btn_check_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/edit_text_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/putio_clickable_button.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/btn_check_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/edit_text_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/putio_clickable_button.xml.
The file will have its original line endings in your working directory.
error: could not apply 43b00e2... test2

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To check out the original branch and stop rebasing run "git rebase --abort".
warning: LF will be replaced by CRLF in project.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/btn_check_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/edit_text_putio.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in res/drawable/putio_clickable_button.xml.
The file will have its original line endings in your working directory.
Could not apply 43b00e2... test2

これはどういう意味ですか、これらのコミットを適切に圧縮するにはどうすればよいですか?

4

1 に答える 1

1

それが、悪名高い CR/LF 問題です。

Git で最適な CRLF (キャリッジ リターン、ライン フィード) 処理戦略は何ですか?

直し方?それはあなたのプラットフォームに依存します。行末の処理方法を git に指示する必要があります。

ファイルから LF を取り除き、それらを git にコミットする必要があるでしょう。この記事には、問題の解決策があります。ポイントは..コミットをスカッシュしたいので、上記のリベースステップ中に修正を適用する必要があります。

于 2012-10-24T03:47:49.913 に答える