Git pull remote branch to local method steps



1. Create an empty file named hhhh

2. Initialization

git init

3. You want to establish a connection with origin master (the underline is the link of remote warehouse)

git remote add origin [email protected]:XXXX/nothing2.git

The remote warehouse link is in GitHub, as shown in the red box below:

Input command:

4. Pull remote branch to local

git fetch origin dev(DEV is the branch name of the remote warehouse)

In the figure below, the branch names that can be used are checked in red

Next, pull the remote development branch and command:

5. Create the branch dev locally and switch to it

Git checkout - B dev (local branch name) origin / dev (remote branch name)


6. Pull the contents of a branch to local

Git pull origin dev (remote branch name)


Finally, back to the local folder hhhh to view, has completed pulling a remote branch to the local!

This article about git pull remote branch to the local methods and steps of this article introduced here, more related git pull remote branch to local content, please search the previous articles of developeppaer or continue to browse the related articles below, I hope you can support developeppaer more in the future!