search

Home  >  Q&A  >  body text

Using tfs git, the code will be modified as soon as it is cloned, and it cannot be undone.

Our project uses Team Foundation Server, Git repository, and IDE is VS. But every time I clone the code, nothing is done. There are many modifications in git status, and they can't be undone. It's very annoying. Please give me some advice! ! ! ! ! Thanks! ! !

某草草某草草2757 days ago1011

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-17 10:04:21

    These modifications may be files automatically generated by the compiler, or the corresponding configuration may be modified based on the local environment to ensure the normal operation of the project.

    Solution:
    Add the file automatically generated by the IDE Ignore the file, ​​and it will not be added to git version management

    If you have set ignored files before, you need to clear the cache and add the ignored files again.

     $ git rm -r --cached .                  //注意这里有个点,清除所有的
     $ git add .                            //注意这里有个点,添加所有的
     $ git commit -m "update .gitigonre"

    reply
    0
  • Cancelreply