Assuming that you mean that the changes are in the working tree (not specified):
git stash git checkout previous-commit path/to/file git stash pop
If you made any changes, you can still do it with a little more work. Suppose your story looks like this:
- x - A - x - x - x - B - x - x (HEAD)
where you want the version in A, plus the changes from B. Then do the following:
git stash git checkout B path/to/file git stash git checkout A path/to/file git stash pop git stash pop
Please note that any firmware application, as it is a mergey operation, can lead to merge conflicts; you must, of course, solve them before moving on!
source share