Created
May 23, 2019 20:38
-
-
Save SrChach/8ddebeb7062ae279b7940ce37628ceb1 to your computer and use it in GitHub Desktop.
useful ways to list changes on git/Formas útiles de listar los cambios en git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Remember that the options below could be used together | |
# List all the changes made in a file | |
git log <path_to_folder_or_file> | |
# Track the change history of a file (including rename) | |
git log --follow <file> | |
# list commits by author | |
git log --author="example_user" | |
# List ALL of the lines of code changed in the commits | |
git log -p | |
# List the last "n" number of commits ("n" is a number) Example: git log -2 | |
git log -<number_of_commits_shown> | |
# list ONLY the name of the files changed in every commit | |
git log --name-only | |
# List the files changed in every commit, and the number of insertions and deletions by file | |
git log --stat | |
# Show branches graphically | |
git log --graph | |
# Show commits with important info in short format | |
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short | |
#beautiful commits <3 | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment