GIT_DISCOVERY_ACROSS_FILESYSTEM not set

前端 未结 8 1655
忘了有多久
忘了有多久 2020-12-07 14:00

I have searched and read few post but my problem is not the same as descirbed. So here\'s the issue: using git clone into folder under external partition of the disk works f

8条回答
  •  旧时难觅i
    2020-12-07 14:38

    I came into this issue when I copy my local repository.

    sudo cp -r original_repo backup_repo
    cd backup_repo
    
    git status
    fatal: Not a git repository (or any parent up to mount point /data)
    Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
    

    I've try git init as some answer suggested, but it doesn't work.

    sudo git init
    Reinitialized existing Git repository in /data/HQ/SC_Educations/hq_htdocs/HQ_Educations_bak/.git/
    

    I solved it by change the owner of the repo

    sudo chown -R www:www ../backup_repo
    
    git status
    # On branch develop
    nothing to commit, working directory clean
    

提交回复
热议问题