{"thread":{"id":"16018","subject":"Tip: avoiding net overhead using git over sshfs","startedAt":"2008-10-23T01:26:18Z","lastAt":"2008-10-23T12:54:16Z","messageCount":5,"participants":["Felipe Carvalho Oliveira","Michael J Gruber","Matthieu Moy","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"93754","messageId":"a2075f4c0810221826w511a3b87r6fea4fb0dee24e1f@mail.gmail.com","threadId":"16018","inReplyTo":null,"subject":"Tip: avoiding net overhead using git over sshfs","fromName":"Felipe Carvalho Oliveira","fromEmail":"felipekde@gmail.com","sentAt":"2008-10-23T01:26:18Z","receivedAt":"2008-10-23T01:26:18Z","isPatch":false,"sender":{"key":"felipekde@gmail.com","avatar":"https://gravatar.com/avatar/d3b0d3f3e680016d92159d539a9fcae3057490722dac4e206176bd4cf7e20e1b?d=mp&s=160"},"body":"Use git over sshfs is not so good, but is an option for people that\ndon't have shell acess to the server/hosting like me.\n\n# mounting\nsshfs -o workaround=rename <user>@<host>:/home/<user>/  <mount_point>\ncd <the_directory_of_your_project>\n\n# we will move the .git directory to the local filesystem\nmv .git ~/.my_project_git\n# and create a symlink to the local .git\nln -s ~/.my_project_git .git\n\nDone!\n\nNow you can open gitk instantly ;-) and don't need to have the entire\n.git thing on a remote filesystem.\n\n         Felipe (from Brazil, my english skills aren't so good :-)\n"},{"id":"93764","messageId":"490036A2.20608@drmicha.warpmail.net","threadId":"16018","inReplyTo":"a2075f4c0810221826w511a3b87r6fea4fb0dee24e1f@mail.gmail.com","subject":"Re: Tip: avoiding net overhead using git over sshfs","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-10-23T08:32:34Z","receivedAt":"2008-10-23T08:32:34Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Felipe Carvalho Oliveira venit, vidit, dixit 23.10.2008 03:26:\n> Use git over sshfs is not so good, but is an option for people that\n> don't have shell acess to the server/hosting like me.\n\nI'm sorry but I'm afraid I'm missing the point: If you don't have shell\naccess then you can't use ssh(fs), can you?\nMaybe you mean you can't set up git daemon or gitweb.cgi on the server?\n\n> # mounting\n> sshfs -o workaround=rename <user>@<host>:/home/<user>/  <mount_point>\n> cd <the_directory_of_your_project>\n> \n> # we will move the .git directory to the local filesystem\n> mv .git ~/.my_project_git\n> # and create a symlink to the local .git\n> ln -s ~/.my_project_git .git\n> \n> Done!\n> \n> Now you can open gitk instantly ;-) and don't need to have the entire\n> .git thing on a remote filesystem.\n\nIn fact your complete git repository is now on the local filesystem,\nwith only the worktree checked out on sshfs. Is that what you are trying\nto achieve? Or do you want to \"synchronize\" repos on local and sshfs\nfilesystems?\n\nMichael\n"},{"id":"93765","messageId":"vpqprlru1na.fsf@bauges.imag.fr","threadId":"16018","inReplyTo":"a2075f4c0810221826w511a3b87r6fea4fb0dee24e1f@mail.gmail.com","subject":"Re: Tip: avoiding net overhead using git over sshfs","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-10-23T09:00:25Z","receivedAt":"2008-10-23T09:00:25Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"Felipe Carvalho Oliveira\" <felipekde@gmail.com> writes:\n\n> Use git over sshfs is not so good, but is an option for people that\n> don't have shell acess to the server/hosting like me.\n>\n> # mounting\n> sshfs -o workaround=rename <user>@<host>:/home/<user>/  <mount_point>\n> cd <the_directory_of_your_project>\n>\n> # we will move the .git directory to the local filesystem\n> mv .git ~/.my_project_git\n> # and create a symlink to the local .git\n> ln -s ~/.my_project_git .git\n\nI think you'd better work locally, and push to the sshfs directory\nfrom time to time. Then, you'd both have working tree and .git locally\nand fast, while keeping the safety of replicating to your ssh server.\n\n-- \nMatthieu\n"},{"id":"93768","messageId":"a2075f4c0810230451lefff6ffnc283f4078eff9f9c@mail.gmail.com","threadId":"16018","inReplyTo":"490036A2.20608@drmicha.warpmail.net","subject":"Re: Tip: avoiding net overhead using git over sshfs","fromName":"Felipe Carvalho Oliveira","fromEmail":"felipekde@gmail.com","sentAt":"2008-10-23T11:51:40Z","receivedAt":"2008-10-23T11:51:40Z","isPatch":false,"sender":{"key":"felipekde@gmail.com","avatar":"https://gravatar.com/avatar/d3b0d3f3e680016d92159d539a9fcae3057490722dac4e206176bd4cf7e20e1b?d=mp&s=160"},"body":"On Thu, Oct 23, 2008 at 6:32 AM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> I'm sorry but I'm afraid I'm missing the point: If you don't have shell\n> access then you can't use ssh(fs), can you?\n> Maybe you mean you can't set up git daemon or gitweb.cgi on the server?\n\nYes, i can't set up any git daemon or any other software.\nI have just sftp acess. And sftp is a \"dumb protocol\" to use git.\n\nOn Thu, Oct 23, 2008 at 7:00 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> I think you'd better work locally, and push to the sshfs directory\n> from time to time. Then, you'd both have working tree and .git locally\n> and fast, while keeping the safety of replicating to your ssh server.\n\nI can't use git-push as I explained before.\nI use git as a deployment tool in this case.\nI work locallly and use git-pull to sync my local repo and the\n\"production\"(server).\nGit works better than a manual (S)FTP sync.\n\n\nI hope I'm more clear now.\n\n--\nFelipe\n"},{"id":"93775","messageId":"490073F8.6080509@viscovery.net","threadId":"16018","inReplyTo":"a2075f4c0810230451lefff6ffnc283f4078eff9f9c@mail.gmail.com","subject":"Re: Tip: avoiding net overhead using git over sshfs","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-10-23T12:54:16Z","receivedAt":"2008-10-23T12:54:16Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Felipe Carvalho Oliveira schrieb:\n> On Thu, Oct 23, 2008 at 7:00 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n>> I think you'd better work locally, and push to the sshfs directory\n>> from time to time. Then, you'd both have working tree and .git locally\n>> and fast, while keeping the safety of replicating to your ssh server.\n> \n> I can't use git-push as I explained before.\n> I use git as a deployment tool in this case.\n> I work locallly and use git-pull to sync my local repo and the\n> \"production\"(server).\n> Git works better than a manual (S)FTP sync.\n\nThen how about this: You keep your repository local, and you also hack\nlocally. When it's time to push your changes to the production server, you\ndo this:\n\n  $ GIT_INDEX_FILE=.git/index.published \\\n    GIT_WORK_TREE=/sshfs-mount/on/production/server \\\n    git reset --hard\n\nThis will update only files that changed since you did this the last time.\n\nDisclaimer: I didn't try this myself.\n\n-- Hannes\n"}]}