2013-10-15 52 views
1

我有个人项目,我开发他们在我的本地PC上,并通过FTP上传到服务器时,我完成他们。推送或提交更改到私人服务器

我开始使用git,对我来说跟踪我改变的东西非常有帮助。但是当我提交或推送更改时,我不想将它们推送或提交给github或类似的东西。我想推他们到现场服务器。这是我自己的专用服务器。因为当我在项目上工作时,我会在本地PC上测试它,我相信它应该是实时的。而不是上传我通过ftp更改的文件,可以使用git将它们推送到我自己的服务器中。这是媒体寺庙专用服务器。

我也安装到服务器的git。我试着先将文件推送到github,然后试图从github克隆存储库,它只创建了文件夹(项目名称)的副本。

当我尝试我活服务器上使用此代码

git clone [email protected]:username/projectname.git thewebsitedirectory.com 

它说

fatal: destination path 'thewebsitedirectory.com' already exists and is not an empty directory. 

因为我已经有文件在那里。我无法删除的文件和这些文件在.gitignore中被忽略。 (上传图片)

我该怎么做,或者我应该使用FTP?

谢谢。

回答

0

我用​​这是我想要什么。

感谢您的帮助。

0

git clone文档:

<directory> 
     The name of a new directory to clone into. The "humanish" part of 
     the source repository is used if no directory is explicitly given 
     (repo for /path/to/repo.git and foo for host.xz:foo/.git). Cloning 
     into an existing directory is only allowed if the directory is empty. 

你可能要检查这一项,而不是那么:How do I clone into a non-empty directory?