I (think) I've set up Git correctly. How do I pull my friend's project that he's shared with me so that I can help him with it?
On GitHub.com, navigate to the main page of the repository. Above the list of files, click Code. Click Open with GitHub Desktop to clone and open the repository with GitHub Desktop. Follow the prompts in GitHub Desktop to complete the clone.
To do so, simply open a terminal window in the directory with the local version of the repository and type the command “git pull”. The operation of this command is particularly simple if you're just wanting to download an updated version of the repository; the local version will be updated to match the remote version.
By "uploaded onto Git" I assume you mean "uploaded onto GitHub". That's an important distinction: Git is a source control system. GitHub is a place to host repositories that are controlled via git.
To clone a repository that is hosted on GitHub, first log into your github account and go to the main page (https://github.com/). Off to the right, just under the tiles at the top will be a section labeled "Your Repositories". The one your friend shared with you should be listed. Click on it. Then near the top of this new page, you'll see a git clone url like "[email protected]:abc/xyz.git". Copy this and then run the command:
git clone [email protected]:abc/xyz.git
Assuming you're trying to clone a repository from GitHub, you will need to follow these steps:
On a terminal window type the command (be sure to enter the URL you copied in step 1):
git clone HTTPS_URL_COPIED_IN_STEP_1.git
If you are asked for your GitHub username & password enter them now. Please note that the username is not your email address.
If you have 2-factor authentication turned on, you'll need to create a personal access token first.Your regular password will not work if you use 2-factor authentication on GitHub.
Follow the instructions here to create the token. Once this is done, enter this in place of the password after step 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With