'Pull single file from master
I'm looking for a solution for a problem I'm trying to solve.
I have a monorepo which has a file in the main branch that is getting updated in every merge to the main branch.
I want the other branches (which are likely behind the main branch) to have the exact version of that file in the main branch.
My question is: Is there a way to pull a single file from main to other branches?
And if so, is there a way to make that process automatic?
I use bitbucket as SCM and VSCode to commit/pull/push.
Solution 1:[1]
I've found a solution.git fetch --all,
followed by
git checkout origin/master -- path/to/file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DlekaShelHaHaim |
