'Visual Studio Code , How do I copy file or folder from one branch to another?
In Visual Studio Code, how do I copy file/folder from one branch to another branch?
Through command line, I can do that using below command.
git checkout branch_A -- Folder\Folder1\file.txt
Solution 1:[1]
In Visual Studio Code you can install GitLens extension which gives you more control over Git.
Using GitLens you are able to compare two branches.

In the Search & Compare tab you can compare the file between the branches to see the changes and you can open the file from the other branch, while still being in your current branch.

Once you open the file from your other branch, while still in your current branch, simply go to File > Save as and overwirte the file in your current branch.
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 | shev.m |
