チェックはあなたが最後の4つのコミットすなわち(f0d5199、a4cb008、2e1f2c2、d70542c) をsqaushとしたい
f0d5199 changes in end points
a4cb008 changes
2e1f2c2 Ui Changes
d70542c Text changes
cb3c304 remove file
のような結果となりますコマンド
$ git log --oneline
を使用してブランチにコミットそれは単一コミットです。
は今第五すなわちcb3c304コミットし、デフォルトのエディタはvimの、ナノなどのオープンとなります
$ git rebase -i cb3c304
コマンドを使用してください。私の場合、
pick d70542c Text changes
s 2e1f2c2 Ui Changes
s a4cb008 changes
s f0d5199 changes in end points
3は再び、のに選ぶ '、および保存(SHA)をコミット変更のように今、あなたは、選ぶか、スカッシュあなたの選択ごとにコミットできるよう
pick d70542c Text changes
pick 2e1f2c2 Ui Changes
pick a4cb008 changes
pick f0d5199 changes in end points
# Rebase cb3c304..f0d5199 onto cb3c304 (2 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
を示していますエディタが開き、再度保存します.New sha(コミットID)が51c2b3bで作成されました。「テキスト変更」メッセージが表示されます。
すべての4つのコミットの変更は、1つの単一コミット(sha 51c2b3b)になります。
スカッシュされています。
git config --global core.editor "subl -n -w"
私はWindows上で問題が解決するかどうかはわかりません。今、Googleで「崇高core.editorを」検索ログ
–何かの理由であなたの返事をお寄せいただきありがとうございます。それは "メモ帳"にハングアップしていました。実際にVimの名前をGit - > usr - > binフォルダの "メモ帳"に変更して、 〜/ .gitconfigのパスをvimやその他のものに変更しても動作しません。今は動作しますが、それは非常に奇妙な解決策です。 – Olak