รวม git tips

Tags: git

Collection of useful git commands

Get log without switch to other branch

git log your-branch-name

Disable auto CRLF

git config --global core.autocrlf false

https://stackoverflow.com/questions/1552749/difference-between-cr-lf-lf-and-cr-line-break-types

git merge --ff-only and git merge --no-ff https://stackoverflow.com/a/9069127/1872200

You can combine git merge --ff-only --no-ff To prevent git merge it it cannot do fast forward merge and then make a new git merge commit with --no-ff

Reset all staged files

git unstage all files