Answer the question
In order to leave comments, you need to log in
How to create a script in Git bash for Windows?
Is it possible to script for bash in windows? For example, I need to create multiple repositories, how to do not write for each git init, git add ., git commit -m "bla-bla-bla". Google doesn't say much about it. Don't kick me too hard, I just took up Git, but I don't want to switch to Linux, there are too few programs that I'm used to using in Windows.
Answer the question
In order to leave comments, you need to log in
Под рукой нет винды но думаю должно получиться, ну или babun поставить лучше(или ждать обновления 10ки со встроенной поддержкой командной оболочки). А батники это от лукавого.
#!/bin/bash
for i in "[email protected]"
do
mkdir ${i}
cd ${i}
git init
echo "README.md of repository ${i}" > README.md
git add .
git commit -m "initial commit"
cd ..
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question