The following untracked working tree files would be overwritten by merge, but I don't care

前端 未结 16 1138
挽巷
挽巷 2020-12-02 03:37

On my branch I had some files in .gitignore

On a different branch those files are not.

I want to merge the different branch into mine, and I don\'t care if t

16条回答
  •  忘掉有多难
    2020-12-02 04:10

    You can try command to clear the untracked files from the local

    Git 2.11 and newer versions:

    git clean  -d  -f .
    

    Older versions of Git:

    git clean  -d  -f ""
    

    Where -d can be replaced with the following:

    • -x ignored files are also removed as well as files unknown to Git.

    • -d remove untracked directories in addition to untracked files.

    • -f is required to force it to run.

    Here is the link that can be helpful as well.

提交回复
热议问题