git: have different .gitignore file for each remote

后端 未结 4 1047
温柔的废话
温柔的废话 2020-12-04 14:57

I have a remote repo in which I want to commit certain files (the compiled files to deploy them on a cloud computing platform), but I don\'t want to deploy them on github...

4条回答
  •  爱一瞬间的悲伤
    2020-12-04 15:54

    An automated solution to the methods mentioned here:

    1. Set up the root .git to ignore the subfolder(s) you you want transmitted differently
    2. Init new git within the subfolder(s) and assign the remote configuration
    3. Modify the root folder's .git/hooks/pre-push file to exec git push at those sub folders based on the incoming arguments.

提交回复
热议问题