Git: Merge only specific file

Git: Merge only specific file

1
git checkout <branch_name> -- <file_name>

I have created a branch(named Branch-B) from the master branch and then amended README.md file in the branch. However both master and Branch-B brances are needed to be kept and README.md needs to be updated in the master branchโ€ฆ

1
git checkout Branch-B -- README.md

๐Ÿ‘ Yay!