Assume I have two branches, master and new_feature
I was supposed to work on a specific feature, I thought this feature would be part of
You may use use the command git cherry to retrieve the commit done on the specific_feature branch and which does not appear on the origin/new_feature branch.
git cherry origin/new_feature specific_feature
You can then create a new branch from master and cherry-pick all these commits. But if you dependencies between your development on specific_feature and origin/new_feature no scm is going to resolve that for you.
git checkout -b specific_feature_master master
git cherry origin/new_feature specific_feature | egrep '^+' | awk '{print $2} | xargs git cherry-pick
Something like that should do starting point for resolving your problem.