.gitignore file in Sourcetree not working

前端 未结 8 1346
走了就别回头了
走了就别回头了 2021-01-30 01:23

I am working on a maven project and I want to ignore the files generated and stored in the /target folder of my project (Evaluation) root folder.In the root of my git repository

8条回答
  •  后悔当初
    2021-01-30 02:09

    If the files have already been added or committed to your Git repository, you must first stop tracking them before they will be ignored by .gitIgnore.

    To stop tracking files in SourceTree:

    Right-click on files. Choose "Stop Tracking".
    (this won't delete your files, it just stops tracking them)

    To stop tracking files from Command-line:

    git rm --cached example.txt
    

提交回复
热议问题