in Technology by
how can we modify Commit, given that it is not the HEAD commit?

1 Answer

0 votes
by

n the default editor, modify pick to edit in the line mentioning 'bbc643cd'.

Save the file and exit: git will interpret and automatically execute the commands in the file. You will find yourself in the previous situation in which you just had created commit bbc643cd.

At this point, bbc643cd is your last commit and you can easily amend it: make your changes and then commit them with the command:

$ git commit --all --amend --no-edit

After that, type:

$ git rebase --continue

to return back to the previous HEAD commit.

WARNING: Note that this will change the SHA-1 of that commit as well as all children -- in other words, this rewrites the history from that point forward. 

if you push using the command git push --force

Related questions

0 votes
    How to modify existing, unpushed commit messages in git?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    I usually submit a list of commits for review. If I have the following commits: HEAD Commit3 Commit2 Commit1 ... ... the HEAD commit? Select the correct answer from above options...
asked Feb 3, 2022 in Education by JackTerrance
0 votes
    I wrote the wrong thing in a commit message. How can I change the message? The commit has not been pushed yet. Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    The _______________ policy, allows a transaction to commit even if it has modified some blocks that have ... Buffer Management in chapter Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    Constraint checking can be disabled in existing _______________ and _____________ constraints so that any data you ... Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I have made a commit and discarded it. I can still retrieve that commit using git reflog. A. True B. False...
asked Dec 24, 2022 in Education by JackTerrance
0 votes
    If a transaction does not modify the database until it has committed, it is said to use the ___________ ... from Recovery topic in division Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    Given that the drawn ball from U2 is white, the probability that head appeared on the coin A. `(17)/(23)` B. `(11) ... ` D. `(12)/(23)` Select the correct answer from above options...
asked Nov 13, 2021 in Education by JackTerrance
...