- GitHub Desktop
- Attribute commits with collaborators easily
- Checkout branches with pull requests and view CI statuses
- Syntax highlighted diffs
- Expanded image diff support
- Extensive editor & shell integrations
- Community supported
- Скачать отдельные файлы из GitHub
- 26 ответов:
- How to download a folder from github?
- 11 Answers 11
- Command line:
- How to download a specific folder from a GitHub repo
- Fastest way to download a GitHub project
- 8 Answers 8
GitHub Desktop
Focus on what matters instead of fighting with Git. Whether you’re new to Git or a seasoned user, GitHub Desktop simplifies your development workflow.
By downloading, you agree to the Open Source Applications Terms.
Attribute commits with collaborators easily
Quickly add co-authors to your commit. Great for pairing and excellent for sending a little love/credit to that special someone who helped fix that gnarly bug of yours. See the attribution on the history page, undo an accidental attribution, and see the co-authors on github.com
Checkout branches with pull requests and view CI statuses
See all open pull requests for your repositories and check them out as if they were a local branch, even if they’re from upstream branches or forks. See which pull requests pass commit status checks, too!
Syntax highlighted diffs
The new GitHub Desktop supports syntax highlighting when viewing diffs for a variety of different languages.
Expanded image diff support
Easily compare changed images. See the before and after, swipe or fade between the two, or look at just the changed parts.
Extensive editor & shell integrations
Open your favorite editor or shell from the app, or jump back to GitHub Desktop from your shell. GitHub Desktop is your springboard for work.
Community supported
GitHub Desktop is open source now! Check out our roadmap, contribute, and help us make collaboration even easier.
Скачать отдельные файлы из GitHub
Я думаю, большинство из вас, разработчики, используют любой VCS, и я надеюсь, что некоторые из вас используют Git. У вас есть какой-либо совет или трюк, как получить URL-адрес загрузки для одного файла в репозитории?
Я не хочу URL для отображения raw-файла; в случае двоичных файлов это ни для чего.
можно ли вообще использовать GitHub в качестве » скачать сервер»?
Если мы решим перейти на код Google, здесь представлена упомянутая функциональность?
или есть ли бесплатный хостинг и VCS для проектов с открытым кодом?
26 ответов:
Git не поддерживает загрузку частей репозитория. Вы должны скачать все. Но вы должны быть в состоянии сделать это с GitHub.
при просмотре файла он имеет ссылку на» сырую » версию. Элемент URL построена так
заполнив пробелы в URL, вы можете использовать Wget или cURL (С -L опция, см. ниже) или что угодно, чтобы загрузить один файл. Опять же, вы не получите ни одного из приятные особенности контроля версий используется Git с этим.
обновление: я заметил, что вы упомянули, что это не работает для двоичных файлов. Вероятно, вы не должны использовать двоичные файлы в своем репозитории Git, но GitHub имеет раздел загрузки для каждого репозитория, который вы можете использовать для загрузки файлов. Если вам нужно более одного двоичного файла, вы можете использовать a .сжатый файл. URL-адрес для загрузки загружаемого файла составляет:
обратите внимание, что URL-адреса, приведенные выше, из ссылок на github.com , будет перенаправлять к raw.githubusercontent.com . Вы не должны напрямую использовать URL-адрес, указанный этим перенаправлением HTTP 302, потому что, per RFC 2616: «поскольку перенаправление может быть изменено время от времени, клиент должен продолжать использовать запрос-URI для будущих запросов.»
- перейдите к файлу, который вы хотите скачать.
- щелкните его, чтобы просмотреть содержимое в пользовательском интерфейсе GitHub.
- в правом верхнем углу щелкните правой кнопкой мыши the .
- Сохранить как.
вы можете использовать API V3, чтобы получить raw-файл, как это (вам понадобится маркер OAuth):
curl -H ‘Authorization: token INSERTACCESSTOKENHERE’ -H ‘Accept: application/vnd.github.v3.raw’ -O -L https://api.github.com/repos/owner/repo/contents/path
все это должно идти в одну строку. Элемент -O опция сохраняет файл в текущем каталоге. Вы можете использовать -o filename , чтобы указать другое имя файла.
How to download a folder from github?
I wished to download the mysite folder from this link: https://github.com/username/repository/master/
11 Answers 11
There is a button Download ZIP . If you want to do a sparse checkout there are many solutions on the site. For example here.
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:
curl https://codeload.github.com/[owner]/[repo]/tar.gz/master | \ tar -xz —strip=2 [repo]-master/[folder_path]
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
Fastest way to download a GitHub project
I need to download the source code of the project Spring data graph example into my box. It has public read-only access. Is there is an extremely fast way of downloading this code?
I have no idea of working on GitHub/committing code and most tutorials out there on the web seems to assume that «I would want to setup a project in GitHub» and inundate me with 15-20 step processes. To me, if a source repository is available for the public, it should take less than 10 seconds to have that code in my filesystem.
Tutorials that provide me with 15-20 step processes:
I need something very very very simple. Just pull the source code, and I am more interested in seeing the source code and not learn GitHub.
Are there any fast pointers/tutorials? (I have a GitHub account.)
8 Answers 8
When you are on a project page, you can press the ‘Download ZIP’ button which is located under the «Clone or Download» drop down:
This allows you to download the most recent version of the code as a zip archive.
If you aren’t seeing that button, it is likely because you aren’t on the main project page. To get there, click on the left-most tab labeled «<> Code».
To me if a source repository is available for public it should take less than 10 seconds to have that code in my filesystem.
And of course, if you want to use Git (which GitHub is all about), then what you do to get the code onto your system is called «cloning the repository».
It’s a single Git invocation on the command line, and it will give you the code just as seen when you browse the repository on the web (when getting a ZIP archive, you will need to unpack it and so on, it’s not always directly browsable). For the repository you mention, you would do:
The git: -type URL is the one from the page you linked to. On my system just now, running the above command took 3.2 seconds. Of course, unlike ZIP, the time to clone a repository will increase when the repository’s history grows. There are options for that, but let’s keep this simple.
I’m just saying: You sound very frustrated when a large part of the problem is your reluctance to actually use Git.