Git ignore .git folder

后端 未结 5 1557
梦如初夏
梦如初夏 2021-02-04 09:41

I have a php project that uses composer for package management. One of the packages is another project belonging to the same repo. I have a need to commit my entire vendor folde

5条回答
  •  情歌与酒
    2021-02-04 10:27

    To not treat sub folder as a submodule, delete the .git folder. So that you won't see a folder with @number in the website. If you want to update the submodule. You can create a script like the following written in Shell

    update.sh

    git clone  
    rm -rf /.git/
    git add 
    git commit -m "Updated module"
    

    update.bat

    git clone  
    rmdir /s /q \.git
    git add 
    git commit -m "Updated module"
    

    I believe this is the best way to avoid @number in GitLab

    You can refer my GitHub repository created for answering this question.

提交回复
热议问题