git - how to exclude files from merging

后端 未结 5 1038
萌比男神i
萌比男神i 2020-12-28 19:28

I\'m trying to keep 2 projects of website in one repository. This websites are mainly the same except template (html,css) files and few config files. The main site (which is

5条回答
  •  别那么骄傲
    2020-12-28 20:24

    Here git-update-index - Register file contents in the working tree to the index.

    git update-index --assume-unchanged 
    

    Example:-

    git update-index --assume-unchanged somelocation/pom.xml

    or

    Add file paths in .gitignore

提交回复
热议问题