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 5961545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:58:47+00:00 2026-05-22T18:58:47+00:00

From the Git Book: if the current branch has not diverged from the other–so

  • 0

From the Git Book:

“if the current branch has not diverged from the other–so every commit present in the current branch is already contained in the other–then git just performs a “fast forward”

I’m trying to reproduce this scenario, but this doesn’t produce any fast forwards:

$ git init
Initialized empty Git repository in /work/fun/git_experiments/.git/
$ echo initial > readme && git add readme && git commit -a -m Created
[master (root-commit) 74495b9] Created
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 readme
$ git branch b1
$ echo modified > readme && git commit -a -m "Modified"
[master d40d5fb] Modified
 1 files changed, 1 insertions(+), 1 deletions(-)
$ git checkout b1
Switched to branch 'b1'
$ echo modified > readme && git commit -a -m "Modified"
[    b1 46fd337] Modified
 1 files changed, 1 insertions(+), 1 deletions(-)
$ git merge master
Merge made by recursive.
$ 
  • 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-22T18:58:47+00:00Added an answer on May 22, 2026 at 6:58 pm

    Because although the content of the two commits are the same, they are not actually the same commit (N.B.: one is commit ID d40d5fb and the other is 46fd337). Thus, branch b1 contains a commit not in master, so not all of the commits in b1 are a descendant of master.

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

Sidebar

Related Questions

Every piece of documentation I've read on git (including the online book and the
I've read a great deal of go from svn to git and other git-svn
Possible Duplicate: git - removing a file from source control (but not from the
I cloned something from git repository, and switched branch git clone ssh://11.21.3.12:23211/dir1/dir2 dir git
I want to parse the output from git log. My current tool does this
From git help commit : « -v, --verbose Show unified diff between the HEAD
Is there any documentation about internal structure of Git index file? From various book
I'm starting to learn Git, reading the ProGit book from time to time. I've
I converted a repository from Git to Mercurial, and created a named branch production
I've changed from Git to SVN the folders which contains the project's code, but

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.