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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:38:14+00:00 2026-06-07T18:38:14+00:00

This is my Git status. Because of some weird reason, master and task-e branches

  • 0

This is my Git status.

enter image description here

Because of some weird reason, master and task-e branches are broken. They can’t be build now.
Only 6f374ed94ad7f04b1f7a2ca2019374bb7785d9e6 commit is valid.
enter image description here

I would like to make this commit to lastest commit of master branch. How do I do?

  • 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-07T18:38:15+00:00Added an answer on June 7, 2026 at 6:38 pm

    It’s not completely clear from your question, but I assume that what you want is to add a new commit whose source code is exactly the same as at the older commit, 6f374ed9. (In other words, you want to avoid rewriting history, since obviously master and task-e have been pushed to GitHub.) This takes a few steps in git, which are described in this question. To summarize that, firstly make sure that you have no uncommitted changes (i.e. git status is clean). You would then need to do:

    # Switch to the branch you want to add the commit to:
    git checkout master
    # (... you can merge the result to the other branch later)
    
    # Move the master branch back to the earlier, good commit, forcing the
    # working tree and the index to match:
    git reset --hard 6f374ed
    
    # Use git reset --soft to point the master branch back to where it was
    # originally, but leave the working tree and index as they were at 6f374ed
    git reset --soft HEAD@{1}
    
    # Commit the result:
    git commit -m "Reverting state back to 6f374ed9"
    

    Then, to update task-e as well, you can do:

    git checkout task-e
    git merge master
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like the simplest Git question, but I can't find ANYTHING on it.
In Git I can do this: 1. Start working on new feature: $ git
I've read this book section about git branches. I have create a branch called
If I run 'git status' on my repo it gives: # On branch master
I am getting this error in my git repository: 22:09:15 $ git status #
Here's an example: >git status # On branch master nothing to commit (working directory
I try running multiple times: git checkout mygithub/master Unfortunately it doesn't check out this
I did this: git branch --track stats_page to create a separate branch to try
I often do this: git add -u git commit ...discover mistake, fix it... git
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a

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.