【问题标题】:Pushing or committing the changes to private server将更改推送或提交到私有服务器
【发布时间】:2013-10-23 12:46:36
【问题描述】:

我有个人项目,我在本地 PC 上开发它们,并在完成后通过 FTP 将它们上传到服务器。

我开始使用 git,跟踪我所做的更改对我来说非常有用。但是当我提交或推送更改时,我不想将它们推送或提交到 github 或类似的东西。我想将它们推送到实时服务器。这是我自己的专用服务器。因为当我从事该项目时,我在本地 PC 上对其进行了测试,我相信它应该是实时的。除了上传我通过 ftp 更改的文件之外,还可以使用 git 将它们推送到我自己的服务器中。媒体神殿专用服务器。

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

当我尝试在我的实时服务器上使用此代码时

git clone git@github.com:username/projectname.git thewebsitedirectory.com

它说

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

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

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

谢谢。

【问题讨论】:

    标签: git github ftp


    【解决方案1】:

    我使用git-ftp,这正是我想要的。

    感谢您的帮助。

    【讨论】:

      【解决方案2】:

      根据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?

      【讨论】:

        猜你喜欢
        • 2018-06-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-11-17
        • 1970-01-01
        • 1970-01-01
        • 2011-09-25
        • 1970-01-01
        相关资源
        最近更新 更多