I want to revert the state of my local git repository to pristine
state i.e. as good as newly cloned repository.
Is there a single command in command which will sync my local repository with base (like git pull --rebase
) but will also :
- Remove any local temporary files created.
- Revert any changes in files.
- Un-stage / Undo any local commits.
If there is not a single command, would there be a better way to do it other than git pull --rebase ; git clean -f
.