本地項目的配置文件自己修改了不想提交到倉庫,每次都要rollback非常不方便。可以試下這個方法:
忽略:
git update-index --assume-unchanged ./sd-schedule/src/main/resources/properties/redis.properties
那麼這個redis.properties就會被忽略,提交時檢測不到修改:
恢復:
$ git update-index --no-assume-unchanged ./sd-schedule/src/main/resources/properties/redis.properties
執行後就能正常提交修改了