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

  • Home
  • SEARCH
  • 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 8978445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:36:54+00:00 2026-06-15T19:36:54+00:00

I have branch say experiment and it was pushed a few days back. Now,

  • 0

I have branch say “experiment” and it was pushed a few days back. Now, the master has been updated and I need to push experiment again after rebasing it to master. But when I rebase it to master I don’t see the patch of experiment on top of master. My experiment branch points to master.

What could be wrong? Could it be because this experiment branch has been already merger with the master or something else?

Git status

$ git status
On branch experiment
Untracked files:
(use “git add …” to include in what will be committed)
a.txt
nothing added to commit but untracked files present (use “git add” to track)

Git log

$ git log experiment
commit bc6c71d5ec6d8798aa283c9feaec844cd03edc60
Author: ssrivastava
Date: Tue Nov 27 12:15:37 2012 +0530
[experiment] Added index to players status

On rebase to master

First, rewinding head to replay your work on top of it…
Fast-forwarded experiment to master.

Generally on applying rebase it applies the latest change on the current branch on top of the base branch but I don’t see anything here.

  • 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-06-15T19:36:55+00:00Added an answer on June 15, 2026 at 7:36 pm

    In general, when rebasing, Git is smart enough to detect which commits do nothing and leaves them out. So when you have changes in master that do the same things as a commit in the experiment branch, that commit is skipped because it would change nothing. While this behaviour can be confusing when reviewing a rebase, it is not what happened in your case.

    A rebase works by finding the common ancestor of both branches; that is then used as the old base. In your case, as you have merged the changes of the experiment branch into the master branch, the common ancenstor is that merge commit. Now that commit is the same what master points at at the moment, and it is actually a child of the experiment branch (which points at the parent in the experiment branch before the merge):

    B --- * --- O --- M       B ~ old base, O ~ old master
     \               /        M ~ current master (the merge commit)
      * --- * ----- E         E ~ experiment branch
    

    So master already contains the full experiment branch, and M is actually ahead of the experiment branch by one commit. If Git were to replay the commits in the experiment branch now on top of master, it would just skip those commits because they are empty—all the changes are inside master already. So essentially it would end up in a fast-forward. Now, as Git is smart, it does not need to try to apply all those commits on top of master to see that they would all be skipped. As master is ahead of the experiment branch, this is always the case. So it can just fast-forward the experiment branch to master directly.

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

Sidebar

Related Questions

Say I have a branch named feature that has been branched off master .
Say I have a project in a git repository. The project has a branch
I have a branch called experiment. git checkout master echo 'some changes' > a.txt
Lets say I have a link to svn://another/repo/tags/1.0 and the author has updated the
I have some unwanted commits in master branch, I've made a branch say, new_branch
Let's say you have a branch master and another branch production , both containing
Say you have a branch on your origin that has a ridiculously long name...
Let's say I have the following commits in my master: master : ---A----B----C----D---E Now
I have a branch called feature and it has a few commits. The branch
I'm on a branch (let's say master), and I have some changes in my

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.