This write-up will provide the method to pull a particular branch from the Git remote server.
How to Pull a Particular Branch from the Remote Server?
To pull a certain branch from the remote server, first, change to the local directory and clone the Git remote repository. Then, run the “$ git pull origin <remote-branch>” command to pull the certain branch from the remote server.
Now, let’s toward the procedure of the provided instructions!
Step 1: Navigate to Directory
Move to the Git directory where the local repository exists:
Step 2: Clone Remote Repository
Next, clone the required remote repository to the local repository by executing the “git clone” command:
Step 3: Pull Remote Branch
Lastly, run the “git pull” command along with the remote repository and branch name:
Here, you can see the particular “master” remote branch is pulled successfully:
That’s all! We have provided the method to pull a particular branch from the Git remote server.
Conclusion
To pull a certain branch from the remote server, first, change to the local directory and clone the Git remote repository by executing the “$ git clone <remote-url>” command. Run the “$ git pull origin <remote-branch>” command to pull the certain branch from the remote server. This write-up discussed the method to pull a particular branch from the Git remote server.