38 lines
499 B
Markdown
38 lines
499 B
Markdown
# git
|
|
|
|
## Config
|
|
|
|
### Default aliases
|
|
|
|
```
|
|
[alias]
|
|
br = branch
|
|
ci = commit
|
|
co = checkout
|
|
st = status
|
|
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
|
diff = diff --ws-error-highlight=all
|
|
```
|
|
|
|
### Line ending settings
|
|
|
|
On Windows:
|
|
|
|
```
|
|
git config core.autocrlf true
|
|
```
|
|
|
|
On Linux (should be default):
|
|
```
|
|
git config core.autocrlf input
|
|
```
|
|
|
|
## Show whitespace errors
|
|
|
|
Also works with `git diff`:
|
|
|
|
```
|
|
git show <commit-id> --ws-error-highlight=new,old
|
|
```
|
|
|