1
0
Fork 0

Added bash commands for replacing .hgignore with .gitignore

This commit is contained in:
jochan 2017-06-13 17:27:07 -07:00
parent b87a3e00eb
commit 57ba7953bf
1 changed files with 6 additions and 5 deletions

View File

@ -36,11 +36,12 @@ for branch in `cat closed.log`; do git tag "closed/$branch" $branch; git branch
git checkout master -f git checkout master -f
git clean -df git clean -df
* create .gitignore: * create .gitignore:
* `find -name ".hgignore"` to find all .hgignore files find . -name ".hgignore" > hgignore-files.log
* rename all .hgignore to .gitignore for file in `cat hgignore-files.log`; do
* rewrite anything under "syntax: regexp" to glob form newfile=${file/hgignore/gitignore};
* remove "syntax: {glob|regexp}" lines cp $file $newfile;
* stage and commit all .gitignore files sed -E -i.bak "s/syntax:/#syntax:/; s/^\^//; s/\$$//; s/\\\w\+/*/; s/\\\\\//\//g" $newfile; #optional
done
# OTHER TASKS # OTHER TASKS
* cloning repo with all branches: * cloning repo with all branches: