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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:18:27+00:00 2026-06-13T08:18:27+00:00

In the documentation for git’s merge command , the result of git merge topic

  • 0

In the documentation for git’s merge command, the result of git merge topic is shown as this:

      A---B---C topic
     /         \
D---E---F---G---H master

In this scenario it looks to me that if I were to delete topic to keep my branch list tidy, that all record of commits A, B, and C would be lost, leaving only a single commit, H (and presumably deleting all the commit messages from A, B, and C):

D---E---F---G---H master

Would this indeed be the case, and if so how would I prevent it? E.g:

D---E---F---G---A---B---C master
  • 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-13T08:18:28+00:00Added an answer on June 13, 2026 at 8:18 am

    No. Everything would still be there.

    Before deleting topic branch:

          A---B---C topic
         /         \
    D---E---F---G---H master
    

    After deleting topic branch:

          A---B---C
         /         \
    D---E---F---G---H master
    

    The branch is just a pointer to commit C. Deleting it doesn’t get rid of the commit.

    Note that if you haven’t merged the topic branch yet, then deleting it will fail unless you use git branch -D. The git branch -d command will only delete merged branches, which preserves all the history but gets rid of the branch name.

    Footnote: You can get the following history by using git rebase master from the topic branch, and then fast-forwarding master to topic, and deleting topic.

    D---E---F---G---A'---B'---C' master
    

    Note that while this is possible it is probably not desirable — the original commits A, B, and C are lost by rebasing.

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

Sidebar

Related Questions

According to documentation , git update-index --refresh does this: Looks at the current index
I am using Git to track my documentation latex source. I want to keep
Is there any version of git documentation in chm format? I know that I
How the git tree shown in the git documentation like the one below G
Git-tag documentation states that a tag should target a commit. So does the git
I want keep all my source code and documentation in one single Git repository.
I am looking for a web interface for git that includes documentation and issue
I maintain a documentation with git and GitHub. The source files are TEX files
I've looked around StackOverflow and other places (including Git documentation) and just cannot get
I am fairly new to Git and trying my best to find some documentation

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.