As you can tell from the title, the reason I'm needing to make my own question about this is I can't quite get the terminology correct to properly search.
I'm working with Git in Sourcetree, and say I have a history of commits
F <- I am here
E
D
C
B
A
What I need to do is restore the working environment to commit C. Then, make some changes and additions to the code (to export a quick patch for the app being developed) and then to return back to F, preserving the changes I made.
I feel like I need to Checkout C, but am unsure at the moment, and would prefer not to bork everything until I get a better understanding.
Edit: I was thinking I could Checkout C, make changes. Stash the changes. Go back to F. And then apply/commit the stash?
commit all your current changes in 'F'.
create a branch from 'C': git checkout C -b C-branch
.
do whatever you need and commit your changes: git commit
check out 'F' again: git checkout F
merge with the C-branch: git merge C-branch