Bring a file from another branch into current branch in git

#
# Bring a file from another branch into current branch using git.
# This will overwrite the version of the file in the current 
# branch if there is one.
# git checkout <source-branch> -- <file-path>

git checkout main -- myfile.py

Bitcoin qr code

Send a Comment

Your email address will not be published.