I am backtracking through my history to find what exactly broke iOS5.1 for my app. I've traced it to a single commit, however the commit has many files.
I would like to git checkout [commit before iOS5 break]
and have all of the changes from the commit that broke iOS5 (ie. the next commit) merged into the commit before it without having the changes committed. That way I can simply revert each file until I find the one with the changes that broke iOS 5.
Any idea on how to take the changes from the commit and put them on my current branch without having them committed yet?
Thanks.
You must create a branch first:
git checkout -b fix bcd7c93
git merge -n 8b53674 # merge without auto-commit
Your solution creates:
HEAD
(hence the "detached" part)fix
' branch to master (or your current branch from which you found the defective commit)The idea is to be able to fix the bug (one or two files modified) and merge it back on the main branch without repeating all the other files part of the commit you have found being problematic.