Git Init Bare on Every Sub Directory in Current Location

#/usr/bin/bash
pwd
# output:
# /home/user


ls
# output:
# repo_1.git
# repo_2.git
# repo_3.git

# single line below "for i in `ls`; do cd $i && git init --bare && cd ../; done;"
for i in `ls`
do
  cd $i && git init --bare && cd ../;
done
# output:
# Initialized empty Git repository in /home/user/repo_1.git
# Initialized empty Git repository in /home/user/repo_2.git
# Initialized empty Git repository in /home/user/repo_3.git

Tidak ada komentar:

Posting Komentar