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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:58:47+00:00 2026-06-11T14:58:47+00:00

I needed to merge two branches — second into first and then get rid

  • 0

I needed to merge two branches — second into first and then get rid of second. Here’s what I did:

  • git cloned the project to get a fresh copy
  • git checkout --track origin/second, made some changes, and committed
  • git checkout --track origin/first, made some changes, and committed
  • git merge second (git says “merge made by recursive”)
  • git branch -d second

Then git says:

$ git branch -d second
warning: not deleting branch 'second' that is not yet merged to
         'refs/remotes/origin/second', even though it is merged to HEAD.
error: The branch 'second' is not fully merged.
If you are sure you want to delete it, run 'git branch -D second'.

Why is this happening? I’ve never gotten this message after a merge before. The merge worked just fine, no conflicts. How do I safely delete the second branch?

  • 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-11T14:58:48+00:00Added an answer on June 11, 2026 at 2:58 pm

    Based on my experiments and @knittl’s and @twalberg’s comments, it seems that git just wanted me to push my changes to the second branch before deleting it.

    I did:

    $ git checkout second
    $ git push origin second
    $ git checkout first
    $ git branch -d second
    

    which worked without warnings.

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

Sidebar

Related Questions

I have merged master into my bugXY branch, and needed to merge a file.
I needed to merge strings that are inside List<string> together into oneliner. I came
I'm just trying ILMerge to merge my application and the needed libraries into one
I am learning C# and needed to merge two dictionaries so I could add
i needed help. How do i get domain from a string? For example: Hi
I have forked an SVN project using Git because I needed to add features
I am currently using git for a project that has two participants (me and
I work with two branches of the same project. Both of them were created
How to merge two PNG's together? I know that you can't use PNGObject.Draw because
I need to merge two query results as in union, but I want to

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.