GitHub CLI has finally come out of beta and can change all that. It allows you to complete all GitHub-related tasks via a command-line interface, from creating repos, to resolving issues, managing pull requests, and publishing releases. What's more, you can use the GitHub API to automate a wide range. How to connect to my Github account using Terminal? To login to my server i use: ssh -l login host for example: ssh -l kunass2 blue-world.pl. But now in one of my repositories on Github i would like to merge a few commits into one using rebase/squash. But i can do that only by terminal. I tried your command in the Bash (MacPro Terminal), am trying to pull/clone the specific folder from Github repo (Sub-folder under repo master folder) but it did not work, please advice, thank you Alternatively, how would i be able to Copy-and-Paste a folder or file at local repo prior pull/clone its content-folder(or file) from remote Github?
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
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:
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.
Now use this URL with the “git” command to clone the repository:
![Download Download](/uploads/1/3/3/2/133274861/708987992.png)
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
During development of Node.JS, you may need to clone a GitHub reposity to local mac computer. A repository on GitHub is a remote repository. You can clone the repository to your mac computer in order to create a local copy and sync between the two locations.
1. Open the main page of the repository in browser. click Clone or download.
2. Click the Copy icon to copy the clone URL for the repository.
How To Download Github Repository In Mac Terminal Download
3. Open Terminal on your mac. You can do this by openning Launchpad and search for Terminal. Once it’s opened, you can right-click the Terminal icon in dock and choose “Options > Keep in Dock” so that you can open it directly from dock next time.
Download Github Repository Windows
4. Type cd and the directory where you want the cloned directory to be made. You can right-click the folder in Finder and choose “Copy <the folder name>” to copy the path into clipboard. Then by pressing “Command” and “v” on your keyboard to paste the path into terminal.
5.Type “git clone”, and then paste the URL you copied in step 2. Press Enter. The local clone will be created.