Move Git folder containing submodules

2019-08-21 03:07发布

I am tracking the /var/www/basedir/ folder. I wish to move one of the folders which contains many subfolders and thousands of files.

[Michael@devserver basedir]$ git mv /var/www/basedir/ayb_application/ /var/www/basedir/application/
fatal: source directory is empty, source=ayb_application/classes_3rd/PHPMailer, destination=application/classes_3rd/PHPMailer

I think it is related to several submodule in the directory, but am not sure. See my below .gitignore and .gitmodules files.

I've tried to manually move these folders, but no success.

Please advise how this can be accomplished.

My GIT version is, and gitignore/gitmodules files are below:

[root@devserver ~]# yum info git
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: centos.eecs.wsu.edu
 * epel: mirror.sfo12.us.leaseweb.net
 * extras: mirrors.easynews.com
 * ius: archive.linux.duke.edu
 * updates: centos.eecs.wsu.edu
1713 packages excluded due to repository priority protections
Installed Packages
Name        : git
Arch        : x86_64
Version     : 1.8.3.1
Release     : 1.sdl6
Size        : 19 M
Repo        : installed
From repo   : PUIAS_6_computational
Summary     : Fast Version Control System
URL         : http://git-scm.com/
License     : GPLv2
Description : Git is a fast, scalable, distributed revision control system with an
            : unusually rich command set that provides both high-level operations
            : and full access to internals.
            :
            : The git rpm installs the core tools with minimal dependencies.  To
            : install all git packages, including tools for integrating with other
            : SCMs, install the git-all meta-package.

[root@devserver ~]#

[Michael@devserver basedir]$ cat .gitignore
/html/*
/ayb_cache/
/ayb_resources/

#Email settings are unique for each server?
/ayb_private/email.php

#Don't track database backups since local and vps have different databases
/backup_database/*

#Some cache files in the main application
/ayb_application/lib/plugins/tinymce_plugins/imageManager/cache/
/ayb_application/lib/plugins/tinymce_plugins/image_purchased/cache/
/ayb_application/lib/plugins_3rd/tinymce_4.0.6/plugins/image/cache/

# Temp files often created by editors
*.~

#Unique for each server.  Used by Apache to restrict access to certain directories
private

# Track some files in html directory
# /html/basedir/ just contains a symbolic link to the library
!/html/basedir/
!/html/support/
!/html/build/
!/html/css/
!/html/images/
!/html/scripts/
!/html/tracker/
!/html/about-us.html
!/html/features.html
!/html/corporate.php
!/html/index.html
!/html/muse_manifest.xml
!/html/sendfax.php
!/html/terms-and-conditions.html

[Michael@devserver basedir]$ cat .gitmodules
[submodule "ayb_application/classes_3rd/PHPMailer"]
        path = ayb_application/classes_3rd/PHPMailer
        url = https://github.com/Synchro/PHPMailer.git
[submodule "ayb_application/classes_3rd/parsecsv"]
        path = ayb_application/classes_3rd/parsecsv
        url = https://github.com/parsecsv/parsecsv-for-php.git
[Michael@devserver basedir]$

标签: linux git
0条回答
登录 后发表回答