1) Create file and name it gitreset.sh
2) Paste this code inside and save file:
#!/bin/bash
GIT_RESET_PATH="$1"
echo "Reset local changes in $GIT_RESET_PATH"
cd $GIT_RESET_PATH
git reset --hard
git clean -fd
3) Open SouксуTree preferences and go to "Custom Actions Tab" and press "Add" button. Fill fields with actual data: Caption, Shortcut, path to script and parameters like that:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd6ObrA2AaALSyhMoLBc2J4BSH7druNCuOeYl_12J3JyjcWCT-zQYh-ekpV2LwOxxgv2lMMA9m1CbH1z8YAST5EMosX3JaH6KQ2FEJLRtJYlh-GGI-JqTJco4VrfnX-iIPBDTe00a9kRk/s320/2017-10-23+12-23-36+Item-0.png)
and click Ok.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm9zxMvZZJRxxLNMqXUNPgq2zdIlnxCE1ecrsSrBFdEIBSodZ_K8D6brqPVFA9L7dnHIzxsum-br23f1I1ncAFm7XWh00QutQeScezLLxpgp1A9CZYJN53-FWQZZN-Z7axKtaZouxSuU8/s320/2017-10-23+12-20-14+Item-0.png)
4) Now you can use chosen shortcut or item in SourceTree menu