23 октября 2017 г.

SourceTree useful custom Actions.

Working with SourceTree sometimes not comfortably. For example when you have a lot of changes in working copy it's not easy to clean it. Revert git modifications and removing untracked files require time. Here script to make it easy! Here example for mac users.

1) Create file and name it gitreset.sh
2) Paste this code inside and save file:

echo "Reset local changes in $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:

and click Ok.

4) Now you can use chosen shortcut or item in SourceTree menu

20 января 2017 г.

Autoloading ssh keys in OSX

Open terminal and use command:
ssh-add -K ~/.ssh/your_private_key