How to make git-diff ignore specific lines

Recently I use git for versioning Cisco router/switch configurations. One problem here is the ‘ntp clock-period’ line. Cisco equipments have a clock adjustment value for NTP in their configuration and its value changes without any manual configuration changes. So even though I have made no changes in their configuration, git-diff shows lines like following. -ntp clock-period 36027555 +ntp clock-period 36027579 Because it will be adjusted automatically, usually no need to save an updated value. So I want them disappear when I do git-diff. The git-diff has ‘-G’ option to show changes matched with regex. But it has no option to avoid matched lines. Generally in such a situation, we use … Continue reading How to make git-diff ignore specific lines