1 год назад
История
README.md
Alias - короткие команды Git
Расположение файлов:
Windows:
.gitconfig -> C:\Users\username
bash_prifile.sh -> C:\Program Files\Git\etc\profile.d
Linux:
.gitconfig и .bashrc -> /home/username/
В файле .gitconfig добавить
[alias]
st = status --short
l = log --oneline --graph --decorate --all
g = log --graph --abbrev-commit --decorate --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)'
br = branch
co = checkout
c = commit -m
a = add .
rh = reset --hard HEAD^1
visual = !gitk
Пример команды -> git br
эти алиасы будут работать везде (cmd , power shell , gitBash)
………………………………
В файле .bashrc или bash_profile.sh добавить
alias gst='git status --short '
alias ga='git add . '
alias gb='git branch '
alias gc='git commit -m '
alias gco='git checkout '
alias gcl='git clone '
alias gps='git push '
alias gpsa='git push -u origin --all '
alias gpl='git pull '
alias gcm='git checkout master'
alias gr='git reset --hard HEAD^1 '
alias gl='git log --oneline --graph --decorate --all '
Пример команды -> gb
эти алиасы будут работать только в gitBash
………………………………
………
Конвейеры
0 успешных
0 с ошибкой