Skip to content

Instantly share code, notes, and snippets.

@mdiener21
Last active February 19, 2026 06:20
Show Gist options
  • Select an option

  • Save mdiener21/9b91790250417a89a1cb17cd756860c6 to your computer and use it in GitHub Desktop.

Select an option

Save mdiener21/9b91790250417a89a1cb17cd756860c6 to your computer and use it in GitHub Desktop.
Git commands I forget
# set local credentials
git config --global credential.helper store
git config --global user.name "$GITLAB_USER_NAME"
git config --global user.email "$GITLAB_USER_EMAIL"
# update remote url
git remote set-url origin <NEW_GIT_URL_HERE>
# git commits per developer
git shortlog -sn --no-merges --since "01 January 2019"
# a clearer better git log view of commits
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
# create log graph
git log --oneline --graph --decorate --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment