I have a folder like xampp/htdocs/test. Actually I need all files from specified branch(for eg:branch1) of git to this 'test' folder. I am using git clone command. But after that I got some files.
Asked
Active
Viewed 468 times
-1
-
Does this answer your question? [How do I clone a single branch in Git?](https://stackoverflow.com/questions/1778088/how-do-i-clone-a-single-branch-in-git) – isherwood Jun 17 '21 at 15:38
-
Note that many web hosting sites (e.g., GitHub) offer ways to download one particular commit, or even files from within one particular commit, and Git has `git archive` to do this same sort of thing. – torek Jun 17 '21 at 15:54
1 Answers
2
Clone the master branch. As you said that you already used
git clone <repository>
Go inside the directory root by
cd <repository>
Execute the git checkout command
git checkout <branch name you want to see the files>
-
2This does accomplish the stated goal, but in large repositories it may mean downloading many more files than are needed. – isherwood Jun 17 '21 at 15:39