It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Possible to Push a Git revision to an FTP?

Borbás Gergely Jun 16, 2013
I know that this is not what Git is meant for, but it could really help me out short-term. I'd prefer solutions within SourceTree, just by adding a remote, maybe setup something on the server side.

1 answer

0 votes
Steve Streeting Jun 16, 2013

Git has an 'archive' command which will zip up the contents of the repo (at a commit if needed), you could use that and then FTP it to your server. On the Mac version of SourceTree the Archive action is available and you can also use a Custom Action to launch a script which does all the actions - on Windows you'll have to simply write a batch script just to use 'git archive' and ftp which you launch yourself.

Borbás Gergely Jun 16, 2013

Whoa, sounds cool, especially the custom action stuff. Is it possible to set up a custom action for Git-Ftp as well? https://github.com/git-ftp/git-ftp

Steve Streeting Jun 16, 2013

You can do anything you can call on the command line - the only caveat is that if you've had to alter your environment in the terminal for something to work (add to PATH or create new environment vars for example), full OS X apps don't see those changes automatically because their environment is different. You can get around that most easily if you've altered your .profile by making sure that you only call full shell scripts from SourceTree (those with a shebang at the top loading them through /bin/sh or /bin/bash) - because those will get all your full terminal environment.

Borbás Gergely Jun 16, 2013

Thanks, I hope will setup one day...
Any hopes on implementing such feature in some future release of SourceTree?

Borbás Gergely Jun 17, 2013

Ca you just show me an example on how to "making sure that you only call full shell scripts from SourceTree"? I've jsut opened up my .profile, and actually have no idea how to grant access to the shells for SourceTree.

Custom action is just set up/and hooked in, but as you expected it tells "launch path not accessible".

Thanks for your time on this.

Borbás Gergely Jun 17, 2013

Uh, I just put it into /usr/local/bin (I saw this path in my .profile), now it is accessible/executable within SourceTree. Sorry for this, this is my first shell script adventure.

Borbás Gergely Jun 17, 2013

Arrgh, I got it. It was my first terminal "project", a bit dragging, but I'm ok now. It has a nice little action that goes "Push to FTP". Thanks.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

190 views 21 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you