Track files in local Git repo but ignore in remote

前端 未结 3 2006
生来不讨喜
生来不讨喜 2020-12-11 15:33

Is it possible to track folders and files in a local repo but not on a remote so that when you push changes, they don\'t get pushed remotely? The reason being is that I\'m u

3条回答
  •  时光取名叫无心
    2020-12-11 15:56

    Create a separate git repo just for your graphics. Put it as a subdirectory in the main project. Add the subfolder to .gitignore in your main repo. Then you won't have to mess with submodules, but you can still version your local files.

    mainrepo
    |
    |-- .git
    |-- .gitignore (contains "graphicsrepo")
    |-- graphicsrepo
    |   |
    |   |-- .git
    |   \-- somefile.jpg
    |
    \-- html
    

提交回复
热议问题