file sync over sftp

Game development with Board Game Arena Studio
Post Reply
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

file sync over sftp

Post by Victoria_La »

I cannot find any information on how to properly sync files for source code.
Now days people don't run sftp manually with password but use ssh key auth.
Is there a way to upload my keys?
How other developers sync files?
User avatar
pikiou
Posts: 389
Joined: 03 October 2011, 05:36

Re: file sync over sftp

Post by pikiou »

I'm sure you're looking for a simple tool, but mine is NetBeans 8.
It's a free editor that supports all formats and uploads files over sftp whenever they are changed (internally or externally).
I extensively use copy/paste history, refactoring, auto-completion, git support, file history view...
Make sure you have the Oracle release of Java otherwise you'll face issues.

Useful shortcuts
alt left/right: jumps to previous/next places you were at
ctrl q: jump to previous places you modified
ctrl b: jump to declaration
ctrl g: go to line number
ctrl p: show function parameter declaration from a function call
ctrl shift space: show php library function full documentation
ctrl shift d: show last 9 copied text even if the text was copied from outside NetBeans. click or type 0..9 to paste
ctrl f: search for selection; F3 for next, shift F3 for previous; +shift = whole project
ctrl h: replace selection; +shift = whole project
ctrl /: comment one or more lines; +shift = opposite effect
tab: add a tabulation to all selected lines; +shift = opposite effect
ctrl shift v: paste and format so it's well indented
ctrl shift s: save all project files
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: file sync over sftp

Post by Victoria_La »

I ended up using sshfs + lsyncd + rsync (I am on ubuntu)
That syncs my local directory in workspace to remote, when changes are made using file system notifications.
In use local workspace to edit files with my IDE (eclipse with php). And store these in local git repo.


Here is the script I use if anybody else interested (that restarts syncing daemon):

#!/bin/bash
BASEDIR=`dirname $0`
REMOTE=$BASEDIR/remote
LOCAL=$BASEDIR/workspace
GAME=mygamenamehere

fusermount -u $REMOTE
sshfs myusernamehere@1.studio.boardgamearena.com: $REMOTE

killall lsyncd
lsyncd -rsync $LOCAL/$GAME/ $REMOTE/$GAME
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: file sync over sftp

Post by Een »

Also, on Ubuntu, you can just use Nautilus "connect to a server" function with URL sftp://1.studio.boardgamearena.com
Then you'll get a mounted local folder mapping your studio folder and you can use any editor you like without further need for sync (I think Geany is a nice editor, not yet bloated with too many features :) )
Post Reply

Return to “Developers”