GitHub is a great resource for developers although it can seem a little complicated to use at first. In this tutorial, we’ll show you how to download from GitHub on the following operating systems: MS Windows, Mac OS X and Linux (CentOS, Debian, and Ubuntu). So without further ado, let’s start.
How to Download From GitHub on Windows & Mac OS X
I thought there's a problem with my shell, so I followed the instructions to change the default Mac OS shell back to bash, using the GUI and also using the command line: chsh -s /bin/bash I also restarted the computer. Command Line Tools bash (git) not working. UNIX's (arguably) most popular and easy to use shell, now ported and ready to use in MacOSX.1. Recommended for shell newbies and vets alike, this is the UNIX. Git for Mac Installer The easiest way to install Git on a Mac is via the stand-alone installer: Download the latest Git for Mac installer. Follow the prompts to install Git. Open a terminal and verify the installation was successful by typing git -version: $ git -version git version 2.9.2. Bash is a popular default shell on Linux and macOS. Git Bash is a package that installs Bash, some common bash utilities, and Git on a Windows operating system. How to install Git Bash Git Bash comes included as part of the Git For Windows package. Download and install Git For Windows like other Windows applications. Once downloaded find the.
Mac and Windows users will be happy to find out that files and projects can be download from GitHub by using a GUI. There are many Git clients available, some free and some commercials, but for this tutorial, we’ll stick to the official Git clients from GitHub.
- Head over to https://desktop.github.com/ and download the Native Git Desktop for your operating system.
- Once the download has completed, proceed with the installation. When asked to sign in, you can either create a free account or skip this step.
- Once you’ve completed the installation, you will see the GitHub Desktop window. Click on Clone a repository:
- Now you’ll need to get the URL of the project you wish to download from GitHub. For this tutorial, we’ll download phpMyAdmin. The URL for the project is https://github.com/phpmyadmin/phpmyadmin. It’s the same URL you would use to access the phpMyAdmin project from your web browser. Select the URL tab and copy the project URL in the text box:
- If you wish to modify the local path, choose another folder. When you’re done, click the Clone button. The phpMyAdmin project will be downloaded to your hard drive.
- Once the cloning process has completed, just click on “open this repository in Explorer” to access the phpMyAdmin files:
So that’s all there is to it. Next, you can copy the downloaded files to your project.
How to Download From GitHub on Linux
On Linux, you’ll to install “Git.” Here’s how to do this depending on the Linux distribution you are using: https://ponrenew476.weebly.com/blog/photoshop-free-download-full-version-mac-cs4.
Installing Git on CentOS
Installing Git on Debian
Installing Git on Ubuntu
Once you’ve installed Git, you can check its version:
Configuring Git for Linux
To use Git, you’ll need to specify your name and email address:
Cloning a GitHub Repository
Start by creating a directory in which you will keep all the GitHub repositories you’ll clone:
Before you can clone a repository, you need to find the URL to its “.git” file. For this example, we’re going to clone the phpMyAdmin repository. Open this URL in your browser: https://github.com/phpmyadmin/phpmyadmin
Click on the green “Clone or download” button and then on the “Copy to clipboard” icon next to the URL.
Git For Windows 10
Now use this URL with the “git” command to clone the repository:
Once the download is completed, the phpMyAdmin files will be found in ~/git/phpmyadmin
So, downloading files from GitHub is as simple as that. Of course, there is much more you can do with Git, such as managing your repositories or contributing to other projects. If you’re interested in learning more about Git, you can read the official documentation here.
Related
Installing and configuring Git on macOS can seem difficult if you’ve never used a command line before, but there are only a few things to learn to get started. This guide will take you through the steps to install and configure Git and connect it to remote repositories to clone, push, and pull.
Installing Git
How to download macos mojave from catalina. Download the latest Git installer package, double click on the installer to start the installation wizard. You’ll be prompted for your system password in order for the installer to complete.
After you have successfully installed Git on Mac, you’ll need to provide secure communication with your Git repositories by creating and installing SSH keys.
Creating SSH keys on Mac
To communicate with the remote Git repository in your Beanstalk account from your Mac, you will need to generate an SSH key pair for that computer. This process requires only a few steps, and all of the tools necessary are included on your Mac.
Launching Terminal
Terminal is an application that comes with macOS and provides you with an interface to run text commands, switch through folders, and manage files. You can usually find it in your Applications → Utilities folder.
Generating a key pair
Type these commands in your Terminal window and press Return. First make sure you are in your home directory:
and then generate the keypair with:
It will ask for location, just accept the default location (
~/.ssh/id_rsa.pub
) by pressing Return. When it asks for a pass phrase, make sure to set a strong pass phrase for the key. We’ve included some additional information about SSH keys and how to manage strong pass phrases in our Tips for using SSH Keys guide.Now that the keys are generated, copy it to your clipboard for the next step:
Your public key is now on your clipboard and you can easily add it to a version control hosting account like Beanstalk. When you paste it, your SSH public key should look something like this:
In your Beanstalk account, the added SSH key will look like this:
Checking your connection
Before trying to access your Git remote repository, check if the connection to your remote hosted Git repository works. Enter the following command in the Terminal, replacing “accountname” with your account name:
In this case, this is the URL to access Git on your Beanstalk account. If you are using another version control hosting service, the URL would be provided by them.
You’ll most likely encounter a message that looks like this:
You can type
yes
and press Enter, which will add your account’s hostname accountname.beanstalkapp.com to a known_hosts
file. This step won’t need to be repeated unless your public key or your account names changes. Also, this must be done from the Terminal before using any GUI clients.Gitbash Windows10
If you were authenticated correctly, you will see a message similar to this one:
You can now continue to configure your local Git profile.
Setting up your Git Profile
After you have authenticated correctly by installing Git and setting up SSH keys, before you start using your Git repositories, you should setup your Git profile by typing following after you run Git bash in command line:
In case you are using Beanstalk for version control, it would be best if your first name, last name and email address match to the ones you use in your account to avoid any conflicts.
Summary
In order to be able to use your repository you need to:
- Install Git
- Generate SSH keys with
ssh-keygen
- Check if the connection to the Git repository is working
- Set up your Git profile
While getting started with Git, the most common mistakes include mismatched private and public SSH keys or the Beanstalk user not having permission to access the repository. Make sure to check these after you have finished setting up Git. If you run into issues, just contact us using one of the links below.
Now what?
Now that you have Git properly installed and configured, you can use a client of your choice. Whether you choose a terminal or a GUI, it is a good idea to learn the basic concepts and commands for versioning your files before. Here’s some recommended reading to get you started:
How To Download Git Bash For Mac Catalina
- Git Immersion Tutorial – an excellent step-by-step tutorial to using Git
- Pro Git E-book and Printed Edition
- The Git Parable – understand the concepts behind Git with a simple story by Tom Preston-Werner