diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-05-09 19:05:15 -0500 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-05-09 19:05:15 -0500 |
commit | 95ffc44ed69e3c383f74f5e5065aed34818ac50c (patch) | |
tree | d56ac1a88d0b96df5760b271010eeb9238f4562a | |
parent | 1f68da8622aab4e4394461ba37ac04c4b854e0c7 (diff) |
feat: added git keep alias
-rw-r--r-- | gitconfig | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -103,4 +103,7 @@ # create git artifacts ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi" - attributes = "!ga() { curl -sL https://gist.githubusercontent.com/tobyvin/70f3671c76016063594ea45edbb97094/raw ;}; ga"
\ No newline at end of file + attributes = "!ga() { curl -sL https://gist.githubusercontent.com/tobyvin/70f3671c76016063594ea45edbb97094/raw ;}; ga" + + # create and keep an empty directory at the provided path + keep = "!gk() { ([ -f $@/.gitkeep ] || (mkdir -p $@ && curl -sL https://api.ef.gy/fortune > $@/.gitkeep)) && (grep -qsxF '!/**/.gitkeep' .gitignore || echo '!/**/.gitkeep' >> .gitignore) ;}; gk"
\ No newline at end of file |