Update Tools/Git
+10
@@ -33,11 +33,21 @@ git push origin 'refs/remotes/{name_of_remote}/:refs/heads/' --prune --tags
|
||||
|
||||
<details>
|
||||
<summary>Explanation</summary>
|
||||
`git rebase -i HEAD~{number_of_commits_to_go_back}`
|
||||
git rebase interactively (commit by commit) from current head to number of commits ago.
|
||||
|
||||
---
|
||||
|
||||
git push --force-with-lease
|
||||
|
||||
git force push but only if there are no new commits
|
||||
</details>
|
||||
|
||||
```
|
||||
git rebase -i HEAD~{number_of_commits_to_go_back}
|
||||
git push --force-with-lease
|
||||
```
|
||||
|
||||
References:
|
||||
- https://stackoverflow.com/questions/73528969/how-to-change-an-old-commit-message
|
||||
- https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force
|
||||
Reference in New Issue
Block a user