How to download project from github
How to download project from github
How to download a folder from github?
I wished to download the mysite folder from this link: https://github.com/username/repository/master/
10 Answers 10
Trending sort
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
Switch to Trending sort
You can download a file/folder from github
Simply use: svn export /trunk/
Ex: svn export https://github.com/lodash/lodash/trunk/docs
Note: You may first list the contents of the folder in terminal using svn ls /trunk/folder
(yes, that’s svn here. apparently in 2016 you still need svn to simply download some github files)
You can use Github Contents API to get an archive link and tar to retrieve a specified folder.
Command line:
For example,
if you want to download examples/with-apollo/ folder from zeit/next.js, you can type this:
Use GitZip online tool. It allows to download a sub-directory of a github repository as a zip file. No git commands needed!
How to download a specific folder from a GitHub repo
Here a proper solution according to this post:
Create a directory
Set up a git repo
Configure your git-repo to download only specific directories
How to download single project from repository?
In normal, when I want to download a project from github, I can choose «download as Zip» or «Clone in Desktop» at the right sight of Web Browser like this:
But in some repository, there are a lot of projects and I don’t want to download all the projects. I just only want to download one of them. but when I klick one of them I didn’t saw the download button or similar. How can I download all files in single project instead of downloading all projects in repository?: I just want to download all file in this: https://github.com/ioscreator/ioscreator/tree/master/IOS8SwiftAddSearchTableViewTutorial
1 Answer 1
Unfortunately, this can’t be done via the website or git, at least from my knowledge.
However, you can download a subdirectory from Github using Subversion. CoderWall with example, by a guy named Janos Gyerik
Example given from link:
Not the answer you’re looking for? Browse other questions tagged git github download or ask your own question.
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
How do I pull my project from github?
I have a project on github that I have been working on before. However, I wiped out my computer and I am wondering which git command should I invoke under my username to checkout my project again so that I can push my latest changes to github under my account.
7 Answers 7
Trending sort
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
Switch to Trending sort
Git clone is the command you’re looking for:
It has really useful content
First, you’ll need to tell git about yourself. Get your username and token together from your settings page.
You will need to generate a new key if you don’t have a back-up of your key.
Then you should be able to run:
Run these commands:
Since you have wiped out your computer and want to checkout your project again, you could start by doing the below initial settings:
Login to your github account, go to the repository you want to clone, and copy the URL under «Clone with HTTPS».
You can clone the remote repository by using HTTPS, even if you had setup SSH the last time:
Using HTTPS is a easier than SSH in this case.
You Can do by Two ways,
1. Cloning the Remote Repo to your Local host
2. Pulling the Remote Repo to your Local host
First you have to create a git local repo by,
example: git init or git init repo-name then, git pull https://github.com/user-name/repository.git
That’s all, All commits and branch in the remote repo now available in the local repository of your computer.
There are few steps to be followed (For Windows)
Open Git Bash and generate ssh key Paste the text below, substituting in your GitHub email address.
This creates a new ssh key, using the provided email as a label.
Generating public/private rsa key pair.
When you’re prompted to «Enter a file in which to save the key,» press Enter. This accepts the default file location.
Enter a file in which to save the key (/c/Users/you/.ssh/id_rsa):[Press enter]
At the prompt, type a secure passphrase. For more information, see «Working with SSH key passphrases».
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]
Add the key to SSH Agent
then Copy the SSH key to your clipboard using this command
Tutorial: Open a project from a repo
In this tutorial, you’ll use Visual Studio to connect to a repository for the first time, clone it, and then open a project from it.
If you haven’t already installed Visual Studio, go to the Visual Studio downloads page to install it for free.
Open a project from a GitHub repo
Visual Studio makes it easy to open a project from a repo. You can do so when you start Visual Studio, or you can do so directly from within the Visual Studio IDE.
Use the start window
Open Visual Studio.
On the start window, select Clone a repository.
Enter or type the repository location, and then select the Clone button.
You might be asked for your user sign-in information in the Git User Information dialog box. You can either add your information or edit the default information it provides.
For more information about signing in to Visual Studio, see the Sign in to Visual Studio page. For specific information about how to use your GitHub account to sign in, see the Work with GitHub accounts in Visual Studio page. And if you receive a trust notification and want to know more about it, see the Configure trust settings for files and folders page.
View files in Solution Explorer
Next, Visual Studio loads the solution(s) from the repository by using the Folder View in Solution Explorer.
Or, you can select the Switch Views button, and then select Program.cs to view a solution’s code.
The default view is set to Folder View. You can change it to Solution View from the Git menu. Select Settings > Source Control > Git Global Settings > Automatically load the solution when opening a Git repository to do so.
Open a project locally from a previously cloned GitHub repo
Open Visual Studio.
On the start window, select Open a project or solution.
Visual Studio opens an instance of File Explorer, where you can browse to your solution or project, and then select it to open it.
If you’ve opened the project or solution recently, select it from the Open recent section to quickly open it again.
Use the IDE
You can also use the Git menu or the Select Repository control in the Visual Studio IDE to interact with a repository’s folders and files.
To clone a repo and open a project
In the Visual Studio IDE, select the Git menu, and then select Clone Repository.
Follow the prompts to connect to the Git repository that includes the files you’re looking for.
To open local folders and files
In the Visual Studio IDE, select the Git menu, select Local Repositories, and then select Open Local Repository.
Alternatively, you can perform the same task from Solution Explorer. To do so, choose the Select Repository control, select the ellipsis icon that’s next to the Filter repositories box, and then select Open Local Repository.
Follow the prompts to connect to the Git repository that has the files you’re looking for.
Browse to an Azure DevOps repo
Here’s how to browse to and clone an Azure DevOps repo by using Visual Studio.
Open Visual Studio.
On the start window, select Clone a repository.
In the Browse a repository section, select Azure DevOps.
Follow the prompts to clone an Azure DevOps repo that includes the files you’re looking for, and then open your project.
Open a project from a GitHub repo with Visual Studio 2019
How you open a project from a GitHub repo by using Visual Studio depends on which version you have. Specifically, if you’ve installed version Visual Studio 2019 version 16.8 or later, there’s a new, more fully integrated Git experience in Visual Studio available to you.
But no matter which version you’ve installed, you can always open a project from a GitHub repo with Visual Studio.
Visual Studio 2019 version 16.8 and later
Here’s how to use Git in Visual Studio 2019 version 16.8 or later.
Clone a GitHub repo and then open a project
Open Visual Studio 2019.
On the start window, select Clone a repository.
Enter or type the repository location, and then select Clone.
You might be asked for your user sign-in information in the Git User Information dialog box. You can either add your information or edit the default information it provides.
For more information about signing in to Visual Studio, see the Sign in to Visual Studio page. And for specific information about how to use your GitHub account to sign in, see the Work with GitHub accounts in Visual Studio page.
Next, Visual Studio automatically loads and opens the solution from the repository.
If your repository contains multiple solutions, Solution Explorer displays them. For a list view of the solutions, select the Switch Views button in Solution Explorer.
Solution Explorer then gives you the option to open the root folder in Folder View or to select a solution file to open.
To toggle the view, select the Switch Views button again.
You can also use the Git menu in the Visual Studio IDE to clone a repo and open a project.
Open a project locally from a previously cloned GitHub repo
Open Visual Studio 2019 version 16.8 or later.
On the start window, select Open a project or solution.
Visual Studio opens an instance of File Explorer, where you can browse to your solution or project, and then select it to open it.
If you’ve opened the project or solution recently, select it from the Open recent section to quickly open it again.
You can also use the Git menu in the Visual Studio IDE to open local folders and files from a repo that you’ve previously cloned.
Visual Studio 2019 version 16.7 and earlier
Here’s how to use Git in Visual Studio 2019 version 16.7 or earlier.
Clone a GitHub repo and then open a project
Open Visual Studio 2019 version 16.7 or earlier.
On the start window, select Clone or check out code.
Enter or type the repository location, and then select Clone.
Visual Studio opens the project from the repo.
If you have a solution file available, it appears in the «Solutions and Folders» fly-out menu. Select it, and Visual Studio opens your solution.
Browse to an Azure DevOps repo with Visual Studio 2019
What you see when you browse to and clone an Azure DevOps repository by using Visual Studio 2019 depends on which version you have. Specifically, if you’ve installed version version 16.8 or later, we’ve changed the UI to accommodate a new, more fully integrated Git experience in Visual Studio in Visual Studio.
But no matter which version you have installed, you can always browse to and clone an Azure DevOps repo with Visual Studio.
Visual Studio 2019 version 16.8 and later
Open Visual Studio 2019 version 16.8 or later.
On the start window, select Clone a repository.
In the Browse a repository section, select Azure DevOps.
If you see a sign-in window, sign in to your account.
In the Connect to a Project dialog box, choose the repo that you want to connect to, and then select Clone.
If you don’t see a pre-populated list of repos to connect to, select Add Azure DevOps Server to enter a server URL. (Alternatively, you might see a «No servers found» prompt that includes links to add an existing Azure DevOps Server or to create an Azure DevOps account.)
Next, Visual Studio opens Solution Explorer that shows the folders and files.
Select the Team Explorer tab to view the Azure DevOps actions.
Visual Studio 2019 version 16.7 and earlier
Open Visual Studio 2019 version 16.7 or earlier.
On the start window, select Clone or check out code.
In the Browse a repository section, select Azure DevOps.
If you see a sign-in window, sign in to your account.
In the Connect to a Project dialog box, choose the repo that you want to connect to, and then select Clone.
What you see in the list box depends on the Azure DevOps repositories that you have access to.
Visual Studio opens Team Explorer and a notification appears when the clone is complete.
To view your folders and files, select the Show Folder View link.
Visual Studio opens Solution Explorer.
If you do not have a solution file in your repo, a ‘No Solutions Found’ message appears. However, you can double-click any file from the folder menu to open it in the Visual Studio code editor.
Next steps
Feel free to dive into any of the following language-specific tutorials:
soimort/you-get
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
NOTICE (30 May 2022): Support for Python 3.5, 3.6 and 3.7 will eventually be dropped. (see details here)
NOTICE (8 Mar 2019): Read this if you are looking for the conventional «Issues» tab.
You-Get is a tiny command-line utility to download media contents (videos, audios, images) from the Web, in case there is no other handy way to do it.
Here’s how you use you-get to download a video from YouTube:
And here’s why you might want to use it:
What you-get can do for you:
Are you a Python programmer? Then check out the source and fork it!
The following dependencies are recommended:
Option 1: Install via pip
The official release of you-get is distributed on PyPI, and can be installed easily from a PyPI mirror via the pip package manager. Note that you must use the Python 3 version of pip :
Option 2: Install via Antigen (for Zsh users)
Option 3: Download from GitHub
to install you-get to a permanent path.
You can also use the pipenv to install the you-get in the Python virtual environment.
Option 4: Git clone
This is the recommended way for all developers, even if you don’t often code in Python.
Option 5: Homebrew (Mac only)
You can install you-get easily via:
Option 6: pkg (FreeBSD only)
You can install you-get easily via:
or download the latest release via:
In order to get the latest develop branch without messing up the PIP, you can try:
Download a video
By default, the one on the top is the one you will get. If that looks cool to you, download it:
(If a YouTube video has any closed captions, they will be downloaded together with the video file, in SubRip subtitle format.)
Or, if you prefer another format (mp4), just use whatever the option you-get shows to you:
Note:
Download anything else
If you already have the URL of the exact resource you want, you can download it directly with:
Otherwise, you-get will scrape the web page and try to figure out if there’s anything interesting to you:
Note:
Search on Google Videos and download
Pause and resume a download
You may use Ctrl + C to interrupt a download.
Set the path and name of downloaded file
Tips:
Tips:
Or, if you prefer to watch the video in a browser, just without ads or comment section:
Tips:
Note:
Reuse extracted data
Warning:
Site | URL | Videos? | Images? | Audios? |
---|---|---|---|---|
YouTube | https://www.youtube.com/ | ✓ | ||
https://twitter.com/ | ✓ | ✓ | ||
VK | http://vk.com/ | ✓ | ✓ | |
Vine | https://vine.co/ | ✓ | ||
Vimeo | https://vimeo.com/ | ✓ | ||
Veoh | http://www.veoh.com/ | ✓ | ||
Tumblr | https://www.tumblr.com/ | ✓ | ✓ | ✓ |
TED | http://www.ted.com/ | ✓ | ||
SoundCloud | https://soundcloud.com/ | ✓ | ||
SHOWROOM | https://www.showroom-live.com/ | ✓ | ||
https://www.pinterest.com/ | ✓ | |||
MTV81 | http://www.mtv81.com/ | ✓ | ||
Mixcloud | https://www.mixcloud.com/ | ✓ | ||
Metacafe | http://www.metacafe.com/ | ✓ | ||
Magisto | http://www.magisto.com/ | ✓ | ||
Khan Academy | https://www.khanacademy.org/ | ✓ | ||
Internet Archive | https://archive.org/ | ✓ | ||
https://instagram.com/ | ✓ | ✓ | ||
InfoQ | http://www.infoq.com/presentations/ | ✓ | ||
Imgur | http://imgur.com/ | ✓ | ||
Heavy Music Archive | http://www.heavy-music.ru/ | ✓ | ||
Freesound | http://www.freesound.org/ | ✓ | ||
Flickr | https://www.flickr.com/ | ✓ | ✓ | |
FC2 Video | http://video.fc2.com/ | ✓ | ||
https://www.facebook.com/ | ✓ | |||
eHow | http://www.ehow.com/ | ✓ | ||
Dailymotion | http://www.dailymotion.com/ | ✓ | ||
Coub | http://coub.com/ | ✓ | ||
CBS | http://www.cbs.com/ | ✓ | ||
Bandcamp | http://bandcamp.com/ | ✓ | ||
AliveThai | http://alive.in.th/ | ✓ | ||
interest.me | http://ch.interest.me/tvn | ✓ | ||
755 ナナゴーゴー | http://7gogo.jp/ | ✓ | ✓ | |
niconico ニコニコ動画 | http://www.nicovideo.jp/ | ✓ | ||
163 网易视频 网易云音乐 | http://v.163.com/ http://music.163.com/ | ✓ | ✓ | |
56网 | http://www.56.com/ | ✓ | ||
AcFun | http://www.acfun.cn/ | ✓ | ||
Baidu 百度贴吧 | http://tieba.baidu.com/ | ✓ | ✓ | |
爆米花网 | http://www.baomihua.com/ | ✓ | ||
bilibili 哔哩哔哩 | http://www.bilibili.com/ | ✓ | ✓ | ✓ |
豆瓣 | http://www.douban.com/ | ✓ | ✓ | |
斗鱼 | http://www.douyutv.com/ | ✓ | ||
凤凰视频 | http://v.ifeng.com/ | ✓ | ||
风行网 | http://www.fun.tv/ | ✓ | ||
iQIYI 爱奇艺 | http://www.iqiyi.com/ | ✓ | ||
激动网 | http://www.joy.cn/ | ✓ | ||
酷6网 | http://www.ku6.com/ | ✓ | ||
酷狗音乐 | http://www.kugou.com/ | ✓ | ||
酷我音乐 | http://www.kuwo.cn/ | ✓ | ||
乐视网 | http://www.le.com/ | ✓ | ||
荔枝FM | http://www.lizhi.fm/ | ✓ | ||
懒人听书 | http://www.lrts.me/ | ✓ | ||
秒拍 | http://www.miaopai.com/ | ✓ | ||
MioMio弹幕网 | http://www.miomio.tv/ | ✓ | ||
MissEvan 猫耳FM | http://www.missevan.com/ | ✓ | ||
痞客邦 | https://www.pixnet.net/ | ✓ | ||
PPTV聚力 | http://www.pptv.com/ | ✓ | ||
齐鲁网 | http://v.iqilu.com/ | ✓ | ||
QQ 腾讯视频 | http://v.qq.com/ | ✓ | ||
企鹅直播 | http://live.qq.com/ | ✓ | ||
Sina 新浪视频 微博秒拍视频 | http://video.sina.com.cn/ http://video.weibo.com/ | ✓ | ||
Sohu 搜狐视频 | http://tv.sohu.com/ | ✓ | ||
Tudou 土豆 | http://www.tudou.com/ | ✓ | ||
阳光卫视 | http://www.isuntv.com/ | ✓ | ||
Youku 优酷 | http://www.youku.com/ | ✓ | ||
战旗TV | http://www.zhanqi.tv/lives | ✓ | ||
央视网 | http://www.cntv.cn/ | ✓ | ||
Naver 네이버 | http://tvcast.naver.com/ | ✓ | ||
芒果TV | http://www.mgtv.com/ | ✓ | ||
火猫TV | http://www.huomao.com/ | ✓ | ||
阳光宽频网 | http://www.365yg.com/ | ✓ | ||
西瓜视频 | https://www.ixigua.com/ | ✓ | ||
新片场 | https://www.xinpianchang.com/ | ✓ | ||
快手 | https://www.kuaishou.com/ | ✓ | ✓ | |
抖音 | https://www.douyin.com/ | ✓ | ||
TikTok | https://www.tiktok.com/ | ✓ | ||
中国体育(TV) | http://v.zhibo.tv/ http://video.zhibo.tv/ | ✓ | ||
知乎 | https://www.zhihu.com/ | ✓ |
For all other sites not on the list, the universal extractor will take care of finding and downloading interesting resources from the page.
If something is broken and you-get can’t get you things you want, don’t panic. (Yes, this happens all the time!)
Check if it’s already a known problem on https://github.com/soimort/you-get/wiki/Known-Bugs. If not, follow the guidelines on how to report an issue.
If you are seeking to report an issue or contribute, please make sure to read the guidelines first.
This software is distributed under the MIT license.
In particular, please be aware that
THE SOFTWARE IS PROVIDED «AS IS», WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Translated to human words:
In case your use of the software forms the basis of copyright infringement, or you use the software for any other illegal purposes, the authors cannot take any responsibility for you.
We only ship the code here, and how you are going to use it is left to your own discretion.
Источники информации:
- http://stackoverflow.com/questions/30084033/how-to-download-single-project-from-repository
- http://stackoverflow.com/questions/1408790/how-do-i-pull-my-project-from-github
- http://docs.microsoft.com/en-us/visualstudio/get-started/tutorial-open-project-from-repo?view=vs-2022
- http://github.com/soimort/you-get