Skip to content

Git notes

Greg Swindle edited this page Apr 13, 2018 · 1 revision

How to modify a specified commit in git?

You can use git rebase, for example, if you want to modify back to commit bbc643cd, run

$ git rebase --interactive 'bbc643cd^'

In the default editor, modify pick to edit in the line whose commit you want to modify. Make your changes and then commit them with the same message you had before:

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

to modify the commit, and after that

$ 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. You can break repos doing this if you push using the command git push --force

"git rewrite history - How to modify a specified commit in git? - Stack Overflow." $site. April 13, 2018. $publisher, Web. April 13, 2018. https://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit-in-git?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Git Git logo

Terminal CLI snippets for git.

  1. Git tips
  2. Git notes

verified Openly declare the health of your product, project, community, and source code with these essential badges. (GitHub SaaS only.)

  1. Badges by category: even more badges, arranged for your pleasure.
  2. Repo status badges 🌟 : a recommended suite of badges for your README, Project Dashboard, PULL_REQUEST_TEMPLATE (or merge_request_template), CONTRIBUTING guidelines, as well as the status checks behind them.

UX Cheat-sheets

Info Icons, images, gists, code snippets, etc.

  1. Architecture Decision Record status labels
  2. Octicon cheatsheet
  3. TechRadar labels

Telescope Stellar languages, frameworks, platform, techniques, and tools.

Clone this wiki locally