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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:16:07+00:00 2026-06-16T07:16:07+00:00

Hey I am new to github so please help me out. I have four

  • 0

Hey I am new to github so please help me out.

I have four commits.

commit4 eh87eg87

commit3 e3e983jj

commit2 de6d6e3d

commit1 du3qw6y1

I want to go back to commit2 and make changes to it and commit it (commit 5) and not lose the rest of the commits like commit4, commit3, commit2 and commit1.

  • 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-16T07:16:08+00:00Added an answer on June 16, 2026 at 7:16 am

    You can try two things:

    1. git rebase --interactive <ID of the commit before commit1>. Read the documentation that git prints for you. Basically, you have to use edit instead of pick for commit1, amend your commit, then continue the rebase.
    2. Note down the IDs of the commits, git reset --hard <ID of the commit before commit1>, then take each commit in order and copy them using git cherry-pick <ID of commit>, change the files that you want to change then git commit --ammend, and go to the next one.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hey people I'm new at jquery and i have been trying to figure this
Hey I'm new with google map api. Please let me know if I can
Hey everyone! Im pretty new to Android and I have a webView under 2
Hey I am new to Httparty. I can fetch data but have problem posting
Hey i'm new to c++ and still working out its perticularities. I'm having the
Hey guys I am new to the iOS world so please bear with me.
Hey I am new to python development and just figured out which version of
Hey still new to JS/CSS/HTML well basicly webdevelopment. I have a page, for which
hey i am new to c# plz help. i am writing a program that
Hey guys I am pretty new to JQuery and I have a question about

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.