Say the branch in which you were working was : master
git add -A
git commit -m "added few changes"
commit hash = 5e108f2
you added your work and then committed it. But then realised you forgot to pull.Now:
git checkout -b newtry master
// git checkout newtry -->optional : try without this