How do you compare two branches?
Using git diff, you may compare two branches. You must use the “git diff” command and specify the branch names separated by dots to compare two branches easily. You may also use the “git diff” command to compare two branches by providing the branch names separated by three dots.