What git gotchas have you been caught by?

后端 未结 9 2086
半阙折子戏
半阙折子戏 2020-12-25 08:51

The worst one I\'ve been caught by was with git submodules. I had a submodule for a project on github. The project was unmaintained, and I wanted to submit patches, but co

9条回答
  •  失恋的感觉
    2020-12-25 09:24

    The usual trailing slash when adding a submodule:

    When you use git add on a submodule, make sure you don’t have a tailing slash.

    > git add local/path
      -- adds the submodule
    
    > git add local/path/
      -- adds all the files in the submodule directly into your repository, big no-no
    

提交回复
热议问题