Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

git-amend

Edit the root commit in Git?

September 23, 2022 by Tarik

As of Git version 1.7.12, you may now use git rebase -i –root Documentation

Categories git Tags git, git-amend, git-commit, git-rebase, git-rewrite-history Leave a comment

How do I push amended commit to the remote Git repository?

September 7, 2022 by Tarik

I actually once pushed with –force and .git repository and got scolded by Linus BIG TIME. In general this will create a lot of problems for other people. A simple answer is “Don’t do it”. I see others gave the recipe for doing so anyway, so I won’t repeat them here. But here is a … Read more

Categories git Tags git, git-amend, git-commit Leave a comment

How to amend a commit without changing commit message (reusing the previous one)?

September 7, 2022 by Tarik

Since Git 1.7.9 you can also use git commit –amend –no-edit to get your result. Note that this will not include metadata from the other commit such as the timestamp or tag, which may or may not be important to you.

Categories git Tags commit, git, git-amend, git-commit Leave a comment

How to undo “git commit –amend” done instead of “git commit”

August 27, 2022 by Tarik

What you need to do is to create a new commit with the same details as the current HEAD commit, but with the parent as the previous version of HEAD. git reset –soft will move the branch pointer so that the next commit happens on top of a different commit from where the current branch … Read more

Categories git Tags commit, git, git-amend, undo Leave a comment
Newer posts
← Previous Page1 Page2

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa