Skip to content

Commit 1385820

Browse files
committed
git diff show tab as 4 space
1 parent ac15c28 commit 1385820

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

memo/memo.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,15 @@ Git
747747
git checkout -- <file>
748748
749749
# git 注意不要把二进制大文件,视频文件等放入到版本库,可能会导致 .git 非常大,删了也无济于事
750-
find . -executable -type f >>.gitignore # https://stackoverflow.com/questions/5711120/gitignore-without-binary-files
750+
find . -executable -type f >>.gitignore # https://stackoverflow.com/questions/5711120/gitignore-without-binary-files
751751
752-
# 如何恢复一个已经删除的分之, https://stackoverflow.com/questions/3640764/can-i-recover-a-branch-after-its-deletion-in-git
753-
git reflog # 查找对应 commit hash
754-
git checkout -b branch-name hash
752+
# 如何恢复一个已经删除的分之, https://stackoverflow.com/questions/3640764/can-i-recover-a-branch-after-its-deletion-in-git
753+
git reflog # 查找对应 commit hash
754+
git checkout -b branch-name hash
755+
756+
# git diff 代码显示 tab 为 4 个空格,比如看 go 代码的时候,git diff 显示 8 个
757+
# https://stackoverflow.com/questions/10581093/setting-tabwidth-to-4-in-git-show-git-diff
758+
git config --global core.pager 'less -x1,5'
755759
756760
# git 如何使用不同的 committer,除了每个项目和全局可以设置 gitconfig 里的 user 外,可以使用如下方式
757761
# https://stackoverflow.com/questions/4220416/can-i-specify-multiple-users-for-myself-in-gitconfig

0 commit comments

Comments
 (0)