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