How to use git to manage one codebase but have different environments

后端 未结 2 1192
青春惊慌失措
青春惊慌失措 2020-12-18 00:00

I\'m using git for a personal project at the moment and have run into a problem of having one codebase for two different environments and was wondering what the cleanest way

2条回答
  •  旧巷少年郎
    2020-12-18 00:30

    I think it is too late for the .gitignore solutions.

    I would :

    • create a laptop branch on your desktop machine machine
    • pull your changes from your laptop on this branch
    • checkout the config file which should not have changed from the master branch
    • verify it works and twiddle till it does
    • commit it
    • checkout the master branch
    • merge it with the laptop branch

提交回复
热议问题