Last active
September 2, 2023 20:06
Revisions
-
DerekV revised this gist
Sep 2, 2023 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/bash default_source=$HOME/.local/share IFS=$'\n' @@ -17,8 +17,8 @@ fi if [[ -z "$GITIGNORES" ]] then echo 'GITIGNORES not defined, defaulting to ' $default_source/gitignore >&2 source="$default_source/gitignore" else source="$GITIGNORES" fi @@ -27,6 +27,7 @@ if [[ ! -e "$source" ]] then echo "$source not found... please set GITIGNORES to a directory containing gitignore files." echo "These files should end in .gitignore, and can be in subfolders." echo "Recommend you just do \"cd ${default_source}; git clone [email protected]:github/gitignore.git\"" exit 1 fi -
DerekV revised this gist
Sep 2, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/bash default_source=$HOME/.local/share/gitignores IFS=$'\n' -
DerekV revised this gist
Oct 1, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ fi for arg in "$@" do for file in $( find "$source" -iname "$arg".gitignore ) do filedir=$(dirname "$file") repo_url=$(cd "$filedir"; git config --get remote.origin.url) -
DerekV revised this gist
Sep 23, 2013 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ #!/bin/bash default_source=$HOME/gitignores IFS=$'\n' @@ -35,10 +34,12 @@ for arg in "$@" do for file in $( find "$source" -iname "$arg"*.gitignore ) do filedir=$(dirname "$file") repo_url=$(cd "$filedir"; git config --get remote.origin.url) echo echo "### $arg $repo_url" echo cat "$file" echo done done -
DerekV created this gist
Sep 23, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ #!/bin/bash repo_url="https://github.com/github/gitignore" default_source=$HOME/gitignores IFS=$'\n' if [[ $# == 0 ]] then echo "Usage Example : " echo " mkdir MyNewProject" echo " cd MyNewProject" echo " git init" echo " gitignore.sh Java Maven Intellij Eclipse Emacs vim OSX Linux Windows >> .gitignore" echo " git add .gitignore; git commit -m \"Import gitignores\"" exit 1 fi if [[ -z "$GITIGNORES" ]] then echo 'GITIGNORES not defined, defaulting to ' $default_source >&2 source="$default_source" else source="$GITIGNORES" fi if [[ ! -e "$source" ]] then echo "$source not found... please set GITIGNORES to a directory containing gitignore files." echo "These files should end in .gitignore, and can be in subfolders." exit 1 fi for arg in "$@" do for file in $( find "$source" -iname "$arg"*.gitignore ) do echo echo "### $arg ( $repo_url ) " echo cat "$file" echo done done