Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I customize the git commands within SourceTree?

Mark F December 5, 2012

I'm running into a problem with submodules, and would like SourceTree to *not* update them recursively (or at all). Is it possible to customize the git commands that SourceTree uses for fetch, pull, etc.?

2 answers

0 votes
MikeL December 6, 2012

Mark, I suggest to fix the bad reference problem inside your repository and not just work-around the core reason.

Mark F December 6, 2012

Yes we obviously did that, but in the meantime dozens of us had to revert to the commandline to use git for a day. Not the best user experience, especially for our designers who exclusively use a git GUI because they don't know how to use the command line!

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2012

You can't change the internal options (beyond the checkboxes etc that are exposed in the UI), but you can create Custom Actions (Preferences > Custom Actions) to run your own commands instead. So you could define alternative Pull commands if you wanted.

I'm curious why you need to do so though, can you illustrate the issue you're having?

Mark F December 6, 2012

We have a very large, shared git repository with multiple projects. One of the projects started using git submodules, and since the majority of developers don't work on that project, they don't need to be constantly checking if the submodules are up-to-date (especially since "git pull" appears to do this automatically).

Also, we were running into a problem where one of the sub-sub-modules had a bad reference, and this showed up in SourceTree as errors EVERY time we fetch or pulled, whereas a simple fetch from the commandline didn't show any errors.

I know that SourceTree is trying to be smart about updating, but it would be nice to have the option to decide what the "pull" button does.

(It would also be nice to decide what the "push" button does so we can add our own pre-push hooks, but that's another feature request perhaps)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events