Last active
April 22, 2021 09:44
-
-
Save reloni/15837f2b773d1c8df43160b4ca923729 to your computer and use it in GitHub Desktop.
Git tricks
This file contains 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
Get git commit history for period: | |
git log --oneline --no-merges --after="2019-C10-01" --until="2019-10-31" --author="Anton Efimenko" --format="%s" | |
Unique commit messages: | |
git log --oneline --no-merges --after="2019-C10-01" --until="2019-10-31" --author="Anton Efimenko" --format="%s" | uniq | |
commits count by author: | |
git shortlog -s -n --all --no-merges | |
download github branch archive: | |
wget https://github.com/reloni/goexample/archive/master.zip && unzip -o master.zip -d ./gotest && rm -f master.zip | |
List lines added/removed by user: | |
git log --author="Anton Efimenko" --pretty=tformat: --numstat | grep -v '^-' | awk '{ add+=$1; remove+=$2 } END { print "Added: ", add, "Removed: ", remove }' | |
# enable credential helper | |
git config --global credential.helper store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment