how to know if a commit is already in code example Example: git check if commit in master git branch --contains $COMMIT_ID