how to get all the commit id in git for specific branch code example Example: git check if commit in master git branch --contains $COMMIT_ID