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 clean -df
* create .gitignore:
* `find -name ".hgignore"` to find all .hgignore files
* rename all .hgignore to .gitignore
* rewrite anything under "syntax: regexp" to glob form
* remove "syntax: {glob|regexp}" lines
* stage and commit all .gitignore files
find . -name ".hgignore" > hgignore-files.log
for file in `cat hgignore-files.log`; do
newfile=${file/hgignore/gitignore};
cp $file $newfile;
sed -E -i.bak "s/syntax:/#syntax:/; s/^\^//; s/\$$//; s/\\\w\+/*/; s/\\\\\//\//g" $newfile; #optional
done
# OTHER TASKS
* cloning repo with all branches: