1 minute coding tip: git diff-words to see diffs on a per-word basis instead of per line

Опубликовано: 09 Сентябрь 2021
на канале: Studying With Alex
4,095
262

1. Open ~/.gitconfig in your favorite editor.
2. Find the [alias] section. If it doesn't exist, add "[alias]" this to the bottom of your .gitconfig.
3. Under the alias section, add this text:

diff-words = diff --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'

Final result:

[alias]
diff-words = diff --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'

4. Run git diff-words.


Смотрите видео 1 minute coding tip: git diff-words to see diffs on a per-word basis instead of per line онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Studying With Alex 09 Сентябрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,095 раз и оно понравилось 262 людям.