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 :-)
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
On Thu, Oct 23, 2008 at 6:32 AM, Michael J Gruber
[off-list ref] 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 [off-list ref] 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
Felipe Carvalho Oliveira schrieb:
On Thu, Oct 23, 2008 at 7:00 AM, Matthieu Moy [off-list ref] wrote:
quoted
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