Skip to content

Instantly share code, notes, and snippets.

@mike-gusiev
Last active February 2, 2017 09:41
Show Gist options
  • Save mike-gusiev/7b5328f7415d330832a2 to your computer and use it in GitHub Desktop.
Save mike-gusiev/7b5328f7415d330832a2 to your computer and use it in GitHub Desktop.
Git tips
git log --pretty=format:"%h - %an, %ar : %s"
alias glop="git log --pretty=format:'%C(yellow)%h|%Cred%ad|%Cblue%an|%Cgreen%d %Creset%s' --date=short | column -ts'|' | less -r"
git log --since=2.days
git log -p -2
git config --global core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
git checkout -b new_branch
git branch -v
git branch new_branch2
git checkout new_branch2
git config --global merge.tool kdiff3
git config --global mergetool.kdiff3.cmd '"C:\\Program Files\\KDiff3\\kdiff3" $BASE $LOCAL $REMOTE -o $MERGED'
git merge master
git mergetool
git config --global push.default matching - пушаются все ветки которые есть на сервере
git config --global push.default simple - пушается только текущая ветка (по умолчанию)
//удалить предыдущий комит
git log
git reset --hard c6242d42d9c2b2dcc070a2b8d9cca64ccb3f8805
git push --force origin bugfix/LLR-280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment