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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:10:27+00:00 2026-05-15T01:10:27+00:00

The title is not very clear. What I actually need to do often is

  • 0

The title is not very clear. What I actually need to do often is the following:

Let’s say I have a development going on with several commits c1,c2,… and 3 branches A,B,C

c1--c2--c3--(B)--c4--(A,C)

Branch A and C are at the same commit.

Now I want branch A to go back where B is, so that it looks like this:

c1--c2--c3--(A,B)--c4--(C)

Important is that this has to happen locally and on GitHub.

  • 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-15T01:10:28+00:00Added an answer on May 15, 2026 at 1:10 am

    Use the reset subcommand:

    git checkout A
    git reset --hard B
    git push --force github
    

    As a sidenote, you should be careful when using git reset while a branch has been pushed elsewhere already. This may cause trouble to those who have already checked out your changes.

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

Sidebar

Related Questions

Sorry if the title is not very clear. I was not sure about the
Sorry about the title. I do realize it's not very descriptive. :| Here is
Bounty update : Already got a very good answer from Mark. Adapted := into
I have a Windows program which generates forms. It takes the Top/Left properties at
I found this site/tutorial/demo from another question here on SO. Very nice and clean
I am reading a database and i want to find if the field title
I've got a very standard AJAX request: $.getJSON('/products/findmatching/38647.json', {}, function(JsonData){ var tableHtml = '';
I've temporarily inherited the responsibility to look after the website front end to our
I am trying to position a div (footer) element at the bottom of a
Answerers: How does one literally detect the user's font scale, so that it may

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.