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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:19:02+00:00 2026-05-21T07:19:02+00:00

I have made 2 git commit $ git log commit 9613e1e84b42aeef645977272d310250339cf0e0 commit 01f8699be310f9a56a40835b48a922a879bba24f Each

  • 0

I have made 2 git commit

 $ git log
commit 9613e1e84b42aeef645977272d310250339cf0e0

commit 01f8699be310f9a56a40835b48a922a879bba24f

Each of them touches DIFFERENT FILES. And I have NOT done a push.

But I would like to amend the commit 01f8699be310f9a56a40835b48a922a879bba24f (not the top one). How can I do it?

I know i can use ‘git commit –amend’ for the amending the top commit. But not the second one.

How can I fix it?

Thank you.

  • 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-21T07:19:03+00:00Added an answer on May 21, 2026 at 7:19 am

    Use an interactive rebase.
    git rebase -i HEAD~2
    will rebase the last two. You get presented with a list in your editor and can choose to edit just one or more.

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

Sidebar

Related Questions

I have made a git commit and subsequent push. I would like to change
I have made a git commit but I have not pushed. And I am
I have made 2 'git commit' locally. But I have not pushed, is it
I have just made a new git repo. I created a couple of files,
With git log , I get a list of commits that I have made
In my git repo which is tracking a svn repo I have made a
I am using Git on Ubuntu 10.04 (Lucid Lynx). I have made some commits to
I have a dirty working tree, dirty because I made changes to source files
I have successfully made, committed, and pushed changes to a central git repository. I
In my git repository, I made 5 commits, like below in my git log:

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.