Download files off of github






















Hey guys, first post here. I'm looking for a blogging platform for my product. However I also want it to be a light weight support page. For this I want to make it easy for people to comment on articles and even have thread We're currently discussing GitHub and other software products. Join in the conversations:. New Post Sign up Sign in. Sign up Sign in. Discussion Sign up Sign in. Mentioned GitHub. Add your thoughts. GitHub, however, still handles downloading files differently than other places.

Most public repositories can be downloaded for free, without even a user account. This is because public repositories are considered to be codebases that are open source.

That said, unless the owner of the codebase checks a box otherwise, their codebase can be downloaded onto your computer, packed into a. Alternatively, you can easily clone a file or repository using a few simple commands on GitHub. Head on over to GitHub and click the 'New Repository' button on the top right of your account page. Note: If you're still displaying the GitHub bootcamp section, it'll show up underneath it. When creating a repository you have a few things to decide including it's name and whether it'll be publicly accessible or not.

Choosing a name should be pretty simple because you likely already have a name for your project. If you're just following along for learning purposes, use 'Hello-World. Because spaces and special characters will cause problems. Keep it simple and easy to type in the command line. If you want to include a more complex name, you can add it to the optional description field beneath the name field. If you're creating an open-source project, you want a public repository.

If you want to code by yourself or share only with specific people, a private repository will do. Make the choice that works best for you and your project. When you're all done, you can click the 'Create repository' button but you might want to do one other thing first: check the 'Initialize this repository with a README' checkbox. Ideally that file would contain a little information about your project, but you might not want to deal with that right now.

For the purposes of this tutorial, we're going to leave the box unchecked because, in the next section, we're going to create a README file from scratch to practice committing sending it to GitHub. When you send files to GitHub, you commit them. Before you start, you need to know where your local code repository is on your computer and how to access it via the command line. In this tutorial, we're going to assume there's a directory called 'Hello-World' in your computer's home folder.

Now that your repository is ready, type this:. If you already had a repository ready to go, you'd just need to cd to that directory and then run the git init command in there instead. Either way, your local repository is ready to go and you can start committing code. But wait, you don't have anything to commit! Let's take a break for a second and see what just happened. Go into the home folder on your computer and look at the Hello-World folder or look at whatever folder you're using for a local repository.

What you won't see is a. Git hides it in there, but because you ran the git init command you know it exists. It doesn't, and you have to tell it. This command will do the trick:. If you want to add other files to commit, you'll use the same command but replace README with the name of a different file. Now, run this command to commit it:. While the other commands were pretty straightforward, the commit command has a little more going on so let's break it down.

When you type git , that's just telling the command line that you want to use the git program. When you type commit , you're telling git you want to use the commit command.

Everything that follows those two thing count as options. The first, -m , is what's known as a flag. A flag specifies that you want to do something special rather than just run the commit command. In this case, the -m flag means 'message' and what follows it is your commit message in the example, 'first commit'.

The message isn't absolutely necessary although you'll usually need to provide one , but simply a reference to help you differentiate the various versions of a file or files you commit to your repository.

Your first commit should go by in a split second because you haven't actually uploaded anything yet.



0コメント

  • 1000 / 1000