* Tip: avoiding net overhead using git over sshfs
@ 2008-10-23 1:26 Felipe Carvalho Oliveira
2008-10-23 8:32 ` Michael J Gruber
2008-10-23 9:00 ` Matthieu Moy
0 siblings, 2 replies; 5+ messages in thread
From: Felipe Carvalho Oliveira @ 2008-10-23 1:26 UTC (permalink / raw)
To: git
Use git over sshfs is not so good, but is an option for people that
don't have shell acess to the server/hosting like me.
# mounting
sshfs -o workaround=rename <user>@<host>:/home/<user>/ <mount_point>
cd <the_directory_of_your_project>
# we will move the .git directory to the local filesystem
mv .git ~/.my_project_git
# and create a symlink to the local .git
ln -s ~/.my_project_git .git
Done!
Now you can open gitk instantly ;-) and don't need to have the entire
.git thing on a remote filesystem.
Felipe (from Brazil, my english skills aren't so good :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tip: avoiding net overhead using git over sshfs
2008-10-23 1:26 Tip: avoiding net overhead using git over sshfs Felipe Carvalho Oliveira
@ 2008-10-23 8:32 ` Michael J Gruber
2008-10-23 11:51 ` Felipe Carvalho Oliveira
2008-10-23 9:00 ` Matthieu Moy
1 sibling, 1 reply; 5+ messages in thread
From: Michael J Gruber @ 2008-10-23 8:32 UTC (permalink / raw)
To: Felipe Carvalho Oliveira; +Cc: git
Felipe Carvalho Oliveira venit, vidit, dixit 23.10.2008 03:26:
> Use git over sshfs is not so good, but is an option for people that
> don't have shell acess to the server/hosting like me.
I'm sorry but I'm afraid I'm missing the point: If you don't have shell
access then you can't use ssh(fs), can you?
Maybe you mean you can't set up git daemon or gitweb.cgi on the server?
> # mounting
> sshfs -o workaround=rename <user>@<host>:/home/<user>/ <mount_point>
> cd <the_directory_of_your_project>
>
> # we will move the .git directory to the local filesystem
> mv .git ~/.my_project_git
> # and create a symlink to the local .git
> ln -s ~/.my_project_git .git
>
> Done!
>
> Now you can open gitk instantly ;-) and don't need to have the entire
> .git thing on a remote filesystem.
In fact your complete git repository is now on the local filesystem,
with only the worktree checked out on sshfs. Is that what you are trying
to achieve? Or do you want to "synchronize" repos on local and sshfs
filesystems?
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tip: avoiding net overhead using git over sshfs
2008-10-23 1:26 Tip: avoiding net overhead using git over sshfs Felipe Carvalho Oliveira
2008-10-23 8:32 ` Michael J Gruber
@ 2008-10-23 9:00 ` Matthieu Moy
1 sibling, 0 replies; 5+ messages in thread
From: Matthieu Moy @ 2008-10-23 9:00 UTC (permalink / raw)
To: Felipe Carvalho Oliveira; +Cc: git
"Felipe Carvalho Oliveira" <felipekde@gmail.com> writes:
> Use git over sshfs is not so good, but is an option for people that
> don't have shell acess to the server/hosting like me.
>
> # mounting
> sshfs -o workaround=rename <user>@<host>:/home/<user>/ <mount_point>
> cd <the_directory_of_your_project>
>
> # we will move the .git directory to the local filesystem
> mv .git ~/.my_project_git
> # and create a symlink to the local .git
> ln -s ~/.my_project_git .git
I think you'd better work locally, and push to the sshfs directory
from time to time. Then, you'd both have working tree and .git locally
and fast, while keeping the safety of replicating to your ssh server.
--
Matthieu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tip: avoiding net overhead using git over sshfs
2008-10-23 8:32 ` Michael J Gruber
@ 2008-10-23 11:51 ` Felipe Carvalho Oliveira
2008-10-23 12:54 ` Johannes Sixt
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Carvalho Oliveira @ 2008-10-23 11:51 UTC (permalink / raw)
To: Michael J Gruber, Matthieu Moy; +Cc: git
On Thu, Oct 23, 2008 at 6:32 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> I'm sorry but I'm afraid I'm missing the point: If you don't have shell
> access then you can't use ssh(fs), can you?
> Maybe you mean you can't set up git daemon or gitweb.cgi on the server?
Yes, i can't set up any git daemon or any other software.
I have just sftp acess. And sftp is a "dumb protocol" to use git.
On Thu, Oct 23, 2008 at 7:00 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> I think you'd better work locally, and push to the sshfs directory
> from time to time. Then, you'd both have working tree and .git locally
> and fast, while keeping the safety of replicating to your ssh server.
I can't use git-push as I explained before.
I use git as a deployment tool in this case.
I work locallly and use git-pull to sync my local repo and the
"production"(server).
Git works better than a manual (S)FTP sync.
I hope I'm more clear now.
--
Felipe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tip: avoiding net overhead using git over sshfs
2008-10-23 11:51 ` Felipe Carvalho Oliveira
@ 2008-10-23 12:54 ` Johannes Sixt
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Sixt @ 2008-10-23 12:54 UTC (permalink / raw)
To: Felipe Carvalho Oliveira; +Cc: Michael J Gruber, Matthieu Moy, git
Felipe Carvalho Oliveira schrieb:
> On Thu, Oct 23, 2008 at 7:00 AM, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
>> I think you'd better work locally, and push to the sshfs directory
>> from time to time. Then, you'd both have working tree and .git locally
>> and fast, while keeping the safety of replicating to your ssh server.
>
> I can't use git-push as I explained before.
> I use git as a deployment tool in this case.
> I work locallly and use git-pull to sync my local repo and the
> "production"(server).
> Git works better than a manual (S)FTP sync.
Then how about this: You keep your repository local, and you also hack
locally. When it's time to push your changes to the production server, you
do this:
$ GIT_INDEX_FILE=.git/index.published \
GIT_WORK_TREE=/sshfs-mount/on/production/server \
git reset --hard
This will update only files that changed since you did this the last time.
Disclaimer: I didn't try this myself.
-- Hannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-23 12:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 1:26 Tip: avoiding net overhead using git over sshfs Felipe Carvalho Oliveira
2008-10-23 8:32 ` Michael J Gruber
2008-10-23 11:51 ` Felipe Carvalho Oliveira
2008-10-23 12:54 ` Johannes Sixt
2008-10-23 9:00 ` Matthieu Moy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.