master
デバッグする必要があるバグのあるブランチがあります。そのためには、一連のデバッグ手順 (変数の出力など) を挿入し、バグを特定して修正を適用したいと考えています。後で、修正をmaster
ブランチにマージしたいのですが、デバッグの変更をスキップしたくありません。
# create debug branch
git checkout -b debug
# ...
# edit sources and add debug prints
# ...
# commit debug changes
git commit --all
# create branch for the fix
git checkout -b fix
適切な修正を行い、コミットします
git commit --all
支店に行くmaster
...
git checkout master
...そして、デバッグを変更せずに修正とマージします
git merge fix # <-- wrong, will merge debug changes as well
fix
なしでマージする方法はdebug
?