I am fairly new to bash scripting and I am trying to build a script to compare branches in 2 different repos in bitbucket.
currently, I have this code:
if [[ clone -eq 0 ]]; then cd ${1} echo " ******************************** CLONE SUCCESSFUL. ADDING $BB_COMPARE AS REMOTE REPO... ******************************** " add_remote=$(git remote add -f b $BB_COMPARE) echo " ************************************ UPDATING REMOTE ************************************ " git remote update echo " ************************************ CHECKING DIFFERENCE ************************************ " git_diff=$(git diff master remotes/b/master) fi if [[ git_diff -eq 0 ]]; then echo " ************************************ ERROR: $1 AND $compare are NOT in sync. ************************************ " I think git diff is what I am looking for, but I might be wrong.