Pretty Git

Set the pretty format:

git log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen(%cr) %C(bold blue)<%an>%Creset -%C(yellow)%d%Creset %s' --abbrev-commit

Create an alias:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset %Cgreen(%cr) %C(bold blue)<%an>%Creset -%C(yellow)%d%Creset %s' --abbrev-commit"

Git: creating a new branch and disabling push

To create a new branch:

git checkout -b [newbranch_name]

To disable pushes only for a branch:

git config branch.branch_name.remote no_push

If the branch is a local dev branch, it won’t be pushed by default; git push (no arguments) pushes only branches that exist locally and on the remote. If you try to push it, you’ll only create a new branch.

If you want to completely disable pushes (but still be able to pull):

git remote set-url --push origin no_push

To check you config:

git config -l