Git merge file from another branch

  1. git checkout --patch
    

Use case: when you want to check out specific part in a file.

2. Direct checkout Use case: replace entire file from another branch

  1. git cherry-pick <commit-hash>
    

Use case: apply enire commit from another branch to your current branch.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Learning-based memory allocation for C++ server workloads summary
  • my question:
  • Binary search algorithm variant
  • Docker Rocksdb build
  • Difference between Dockerfile and Docker Compose