Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 971329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:56:50+00:00 2026-05-16T02:56:50+00:00

Another question says that git pull is like a git fetch + git merge

  • 0

Another question says that git pull is like a git fetch + git merge.

But what is the difference between git pull and git fetch + git rebase?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:56:51+00:00Added an answer on May 16, 2026 at 2:56 am

    It should be pretty obvious from your question that you’re actually just asking about the difference between git merge and git rebase.

    So let’s suppose you’re in the common case – you’ve done some work on your master branch, and you pull from origin’s, which also has done some work. After the fetch, things look like this:

    - o - o - o - H - A - B - C (master)
                   \
                    P - Q - R (origin/master)
    

    If you merge at this point (the default behavior of git pull), assuming there aren’t any conflicts, you end up with this:

    - o - o - o - H - A - B - C - X (master)
                   \             /
                    P - Q - R --- (origin/master)
    

    If on the other hand you did the appropriate rebase, you’d end up with this:

    - o - o - o - H - P - Q - R - A' - B' - C' (master)
                              |
                              (origin/master)
    

    The content of your work tree should end up the same in both cases; you’ve just created a different history leading up to it. The rebase rewrites your history, making it look as if you had committed on top of origin’s new master branch (R), instead of where you originally committed (H). You should never use the rebase approach if someone else has already pulled from your master branch.

    Finally, note that you can actually set up git pull for a given branch to use rebase instead of merge by setting the config parameter branch.<name>.rebase to true. You can also do this for a single pull using git pull --rebase.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a comment in another question that says the following: When it comes to
In another question , Stephen C says: A second concern is that there are
This answer on another question says that array.map(&:to_s) is faster than array.map { |n|
Another question related to this one . I have a List<SortableObjects> that is the
From another question I recently posted, it seems that Classic ASP might not be
In another question , I asked something similar but I ended up just posting
In another question, the answer states that on Unixes with /proc , the really
This may look like the recent question that asked why Perl doesn't allow one-liners
As I mentioned in another question Matlab - Can't call function because it says
A comment to another of my questions says that I can only run so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.