Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.
| Наступна ревізія | Попередня ревізія | ||
|
programming:git [2018/10/20 00:53] charon створено |
programming:git [2024/10/22 12:52] (поточний) charon |
||
|---|---|---|---|
| Рядок 1: | Рядок 1: | ||
| + | ====== Setup ====== | ||
| + | ===== Common ===== | ||
| + | < | ||
| + | # configure the user which will be used by git | ||
| + | # Of course you should use your name | ||
| + | git config --global user.name " | ||
| + | |||
| + | # Same for the email address | ||
| + | git config --global user.email " | ||
| + | |||
| + | # set default so that all changes are always pushed to the repository | ||
| + | git config --global push.default nothing | ||
| + | |||
| + | # colors | ||
| + | git config --global color.ui true | ||
| + | git config --global color.status auto | ||
| + | git config --global color.branch auto | ||
| + | |||
| + | # set editor | ||
| + | git config --global core.editor vim | ||
| + | |||
| + | # add aliases | ||
| + | git config --global alias.ci commit | ||
| + | git config --global alias.co checkout | ||
| + | |||
| + | # Reset any local and staged changes as if nothing happened | ||
| + | git config --global alias.nah "!git reset --hard && git clean -df" | ||
| + | |||
| + | # Add more changes to the latest commit without editing commit message | ||
| + | git config --global alias.amend " | ||
| + | </ | ||
| + | |||
| + | ===== For Linux ===== | ||
| + | git config --global core.autocrlf input | ||
| + | git config --global core.safecrlf true | ||
| + | |||
| + | ===== For Windows ===== | ||
| + | git config --global core.autocrlf true | ||
| + | git config --global core.safecrlf true | ||
| + | | ||
| + | ===== Useful bash aliases ===== | ||
| + | alias gfo=' | ||
| + | alias gitlog=' | ||
| + | alias gpull=' | ||
| + | alias gpush=' | ||
| + | alias gst=' | ||
| + | |||
| + | ====== Links ====== | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||