I have commit number. I would like to get previous commit number(parent). I need commits from current branch.
If ${SHA} is the commit you know and you want its parent (assuming it's not a merge commit and has only one parent):
git rev-parse ${SHA}^