-
Notifications
You must be signed in to change notification settings - Fork 26
Git notes
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
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
CLI snippets for
git
.
Openly declare the health of your product, project, community, and source code with these essential badges. (GitHub SaaS only.)
- Badges by category: even more badges, arranged for your pleasure.
- 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.
Icons, images, gists, code snippets, etc.
Stellar languages, frameworks, platform, techniques, and tools.