| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f890582 commit 081f72e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -306,17 +306,10 @@ $ git push --force-with-lease origin my-branch | |||
| 306 | 306 | ``` | |
| 307 | 307 | ||
| 308 | 308 | **Important:** The `git push --force-with-lease` command is one of the few ways | |
| 309 | - to delete history in `git`. Before you use it, make sure you understand the | ||
| 310 | - risks. If in doubt, you can always ask for guidance in the pull request. | ||
| 311 | - | ||
| 312 | - If you happen to make a mistake in any of your commits, do not worry. You can | ||
| 313 | - amend the last commit (for example if you want to change the commit log). | ||
| 314 | - | ||
| 315 | - ```text | ||
| 316 | - $ git add any/changed/files | ||
| 317 | - $ git commit --amend | ||
| 318 | - $ git push --force-with-lease origin my-branch | ||
| 319 | - ``` | ||
| 309 | + to delete history in `git`. It also complicates the review process, as it won't | ||
| 310 | + allow reviewers to get a quick glance on what changed. Before you use it, make | ||
| 311 | + sure you understand the risks. If in doubt, you can always ask for guidance in | ||
| 312 | + the pull request. | ||
| 320 | 313 | ||
| 321 | 314 | There are a number of more advanced mechanisms for managing commits using | |
| 322 | 315 | `git rebase` that can be used, but are beyond the scope of this guide. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments