How I can store some local changes that survives git reset --hard

前端 未结 3 1876
借酒劲吻你
借酒劲吻你 2021-01-05 07:16

I have some local changes (not in separate files so .gitignore doesn\'t work) that I don\'t want to commit.
I do git reset --hard sometimes after

3条回答
  •  失恋的感觉
    2021-01-05 08:10

    If you never want these changes to be committed but always need them locally then consider creating and commiting a script or patch file for your local changes. Then you can keep and document your changes as well as easily apply them after a hard reset.

    If you have changes that are specific to your environment then it may be worth externalising them into a configuration file.

提交回复
热议问题