Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Git Tutorial 11 – Git Pull – Download And Merge Changes From Remote Repository

Posted on 01/13/2025 By admin

As a part of GIT Tutorials End To End, we will learn about another frequently used and important git command “git pull“ in this post.

I will expect that you are aware of the basic concepts and commands of GIT. But if you are a beginner in GIT then I strongly recommend you to refer GIT Basic Commands and Concepts section on my blog first.

Did you know that I have started a YouTube channel as well and I need your support to make it successful. Please do watch content then comment, like, share, and obviously subscribe.

In real-time more than one developer will be working on the same repository. Suppose there are two developers in a project – DevA and DevB who have the same code base. DevA developed a feature in his local repository and push those new codes to the remote repository. DevB wants those changes in his local repository. DevB can use the “git pull” command for this.

The “git pull” command downloads and merge contents from a remote repository into the local repository to match the content. If you have referred “git fetch” tutorial then you can understand that the “git fetch” only downloads contents while the “git pull” command downloads and merge contents. In the “git fetch” tutorial, I explicitly merged the content using the git merge command. The git pull command is a combination of “git fetch” and “git merge” commands. In fact, the “git pull” command uses “git fetch” and “git merge” commands.

I will demonstrate the git pull command with an example now.

We will use a public demo repository from my GitHub.

Repository link – https://github.com/amod-mahajan/gitPullExample.git

This repo has one commit and one file.

  1. Clone the above repository in your local. I have already covered “git clone” command in detail here.

2. Run “git log” command to view existing commits. We should also check existing files. You can go to the folder (gitPullDemo in my case) in the file directory as well to check the content.

3. Now we have cloned the repo in our local. Let’s add a new file in the repo directly using GitHub. Follow the steps shown below to add and commit a new file. It is similar to the scenario above in which DevA pushes a new feature to the remote repository.

4. This newly added file will not be available to my locally cloned repository. Now run the “git pull origin main” command. This command says that pull the content from the “main” branch in the “origin” repo.

As the “git pull” command fetches and merges, we can see the newly added file named “FileB” in my local repo.

5. You can see pulled commits using the “git log” command.

Please subscribe to my YouTube channel Retarget Common to learn from my video tutorials.

Below are important end to end tutorials for Testers:-

Selenium Tutorials

Rest Assured Tutorials

Postman Tutorials

TestNG Tutorials

If you have any doubt, feel free to comment below.If you like my posts, please like, comment, share and subscribe.#ThanksForReading

#HappyLearning

Uncategorized

Post navigation

Previous Post: Create a Map From Excel Data in Java – Selenium – API Automation
Next Post: Handling Browser Window In Selenium Webdriver

Related Posts

April 14, 2018 – Make Selenium Easy Uncategorized
Hierarchy of Selenium Classes and Interfaces – Make Selenium Easy Uncategorized
REST Assured Tutorial 28 – What is Plain Old Java Object (POJO) ? Uncategorized
Independent-dependent concept in XPath Expression Uncategorized
How To Load URL In Selenium WebDriver – get() & navigate() Uncategorized
ReferenceTestng – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark