Compare the same file between different git branches

#
# compare differences in the myfile.py file between the version 
# on the dev branch and the version on the main branch
# 
# git diff {base branch} {branch to compare} -- {relative file path}

git diff dev main -- myfile.py

Bitcoin qr code

Send a Comment

Your email address will not be published.