I have a git repo with several folders in it
I want to checkout only 1 folder,and not all of them
What is the command for it ?
You can checkout any file or folder to wherever you like. E.g. If your current repository has a folder src/main/java you can do a
git --work-tree=/tmp/someCheckout checkout -- src/main/java
This will checkout the folder src/main/java to the directory /tmp/someCheckout.
 
    
    You can simply run git checkout path/to/folder/ this will checkout all files inside the selected folder.
You add files using git add path/to/folder/ to add all files inside the specified folder with all sub-folder files.
