Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ To undo or discard commits, you can use
`git commit -a --amend` to amend to previous commit (only if you haven't pushed yet). (Note: if you use `-a` it will include all staged changes, so you might want to `git status` first).

## git push force
`git push --force` will overwrite the status of the branch on the remote with your local status.
* `git push --force` will overwrite the status of the branch on the remote with your local status.

* `git push --force-with-lease` is like `git push --force` with the additional check that the current status of the remote matches the local status for the remote. It helps in preventing you from deleting commits from other team members.

**Note:** The original status on the remote will be **destroyed**. If anyone on the team has that branch locally, they'll need to delete it locally and checkout the branch again to get it in the same status as the remote.

Expand Down