I recently did a freelance assignment from the master branch of my customer's project by mistake. I assured him that I could move my work to an entirely different branch and return master to the original commit I started from.
I already checked out a new branch (via git checkout -b NewBranch
)
But between reset
revert
and cherry-pick
it's not clear to me which command best suits my needs.
Specifically, I want to make it look like the master branch was never touched. I'm afraid of rolling back to a previous commit on master
and losing the commits on NewBranch
Note: none of my commits have been pushed