Skip to content

Instantly share code, notes, and snippets.

View amaksoft's full-sized avatar

Andrei Makeev amaksoft

View GitHub Profile
@amaksoft
amaksoft / gitcheats.txt
Created September 30, 2016 14:23 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get most modified files and counts
git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count\tfile"} {print $1 "\t" $2}' | sort -g
# Locally checkout all remote branches of a repository
git branch -r | cut -d '/' -f2 | grep -Ev '( |master)' | xargs -Ibranch git checkout -b branch origin/branch
# Open current Git repository URL
@amaksoft
amaksoft / build.gradle
Created August 22, 2016 16:30 — forked from rponte/build.gradle
Excluding global dependency from all configurations (Gradle)
// ...
configurations {
all*.exclude group: 'xml-apis', module: 'xmlParserAPIs'
}
// Equivalent to:
configurations {
all.collect { configuration ->
configuration.exclude group: 'xml-apis', module: 'xmlParserAPIs'
}