3

As the title implies, I use Code OSS for some development.

Is there a way I can download a file, folder or even the whole solution to my desktop easily? The only option i have encountered so far is to have to GIT Push/Pull the entire solution which is really cumbersome, especially if I only need 1 folder.

DottoreM
  • 309
  • 6
  • 27

2 Answers2

0

Check out the GitZip browser extension. It will be helpful for downloading specific files and folder without having to git clone the entire solution.

The usage is very simple:

  1. Install the extension using given link.
  2. Get an access token by clicking the extensions icon near the address bar.
  3. Browse to any GitHub repo and right-click the blank section near any file/folder and click "Download folder/file name as zip".

It works great in most cases where the number of nested files and folders is less than 1000 due to GitHub Trees API limitation.

enter image description here

Mikaal Anwar
  • 1,720
  • 10
  • 21
  • I need to download the file/folder from Code OSS not from Github. I'm not sure this solves what i need. – DottoreM Sep 24 '20 at 14:43
0

Git does not support downloading a specific folder.

But you can achieve this using Github subversion support.

Steps

  1. Install svn. For example, TortoiseSVN.
  2. Install SVN extension in Code.
  3. Open Command Palette in Code (Ctrl+Shift+P or Cmd+Shift+P) and type svn:checkout and hit Enter to run the checkout command.
  4. Enter the path of the Git folder you want to download replacing the path's tree/master part with trunk as shown here.

For example, if you want to download the packages folder in the vue-next repository, https://github.com/vuejs/vue-next/tree/master/packages will be the Github URL for the folder.

Replace the tree/master part with trunk: https://github.com/vuejs/vue-next/trunk/packages. This will be your SVN checkout path you'll enter in the svn checkout dialog in Code.

  1. Select a local repository location to checkout.

This is probably too much for downloading a folder. But writing this as you wanted a way to download a folder from Code itself. I didn't find any Code extension that could achieve this directly.

And I personally think that Mikaal Anwar's solution is a better one if you want to do it from a browser instead of from VSCode.

Reference: https://stackoverflow.com/a/18194523/4453794

  • The question was never about git. I have a browser-based version of Code OSS (the open source layer of vs code) and i want to download a folder from it. without resorting to git. AFAIK i still have to push to git in both solutions – DottoreM Sep 25 '20 at 13:39