0

I want to get the copy of code from github from a particular branch into my local machine.

I need to fetch the copy of a particular folder from github from a selected branch but i am unable to do so. I tried achieving through svn command but it enables only the code from master branch.

svn export https://github.com/Tavisca-Saurabh/Angular-Library/trunk/Tavisca-Orxe3-Library/projects/tavisca-orxe3-library/src/lib/tavisca-input

This enables me to get data from master branch but when i try with specific branch it shows error.

  • _"but when i try with specific branch it shows error."_. Are you saying that when you try to 'clone' a specific branch, it gives an error? Or are you trying to say, when you try to switch branch after cloning the repository with the above mentioned code, it gives an error? p.s. could you post the error here also. – Duck Dodgers Jan 10 '19 at 09:01
  • Hi Joey, I was trying to copy the particular file from github with svn export command. I am nt much familiar with svn all i need is the folder from github onto my machine but nt with git commands. – Shreea Kapoor Jan 10 '19 at 09:08
  • C:\Users\skapoor\Desktop>svn export https://github.com/Tavisca-Saurabh/Angular-Library/tree/Develop/Tavisca-Orxe3-Library/projects/tavisca-orxe3-library/src/lib/tavisca-input svn: E170000: URL 'https://github.com/Tavisca-Saurabh/Angular-Library/tree/Develop/Tavisca-Orxe3-Library/projects/tavisca-orxe3-library/src/lib/tavisca-input' doesn't exist – Shreea Kapoor Jan 10 '19 at 09:10
  • does [this](https://stackoverflow.com/questions/122107/checkout-one-file-from-subversion) work for you? – Duck Dodgers Jan 10 '19 at 09:40

1 Answers1

1

Try replacing the URL with "github.com/Tavisca-Saurabh/Angular-Library/branches/Develop/..." instead of "github.com/Tavisca-Saurabh/Angular-Library/tree/Develop/..."

I am able to export the URL you have mentioned.

svn export https://github.com/Tavisca-Saurabh/Angular-Library/branches/Develop/Tavisca-Orxe3-Library/projects/tavisca-orxe3-library/src/lib/tavisca-input
GRS
  • 1,829
  • 1
  • 9
  • 23
  • I am able to export the URL you have given. "svn export https://github.com/Tavisca-Saurabh/Angular-Library/branches/Develop/Tavisca-Orxe3-Library/projects/tavisca-orxe3-library/src/lib/tavisca-input" – GRS Jan 10 '19 at 10:16
  • Yeah it helped Thanks – Shreea Kapoor Jan 10 '19 at 10:41