.gitignore file in Sourcetree not working

前端 未结 8 1335
走了就别回头了
走了就别回头了 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 01:54

    I had a problem with bin folder being tracked (entire folder).

    So here are the quick steps (more visual, as I'm more of a visual type of person):

    1. Just for security purposes, I zipped entire bin folder
    2. Move it to desktop
    3. Move (current) .gitignore to the desktop as well
    4. Delete entire BIN folder
    5. Commit changes (via favourite git commit tool)
    6. Commit, push, done!
    7. Go back to the basic project's folder
    8. Move back the .gitignore file
    9. Optional - move back (unzip) the bin folder as well.
    10. As a result, you will see that the git tool is no longer tracking changes from the bin folder.

    I hope this helps someone.

提交回复
热议问题