22 lines
791 B
Bash
22 lines
791 B
Bash
# backup current snapshots to .gitConfigBackups with date mark
|
|
cp .gitignore .gitConfigBackups/.gitignore_moving2Public_$(date +"%Y%m%d%H%M%S")
|
|
cp .gitignore_public .gitConfigBackups/.gitignore_public_$(date +"%Y%m%d%H%M%S")
|
|
cp .gitignore_private .gitConfigBackups/.gitignore_private_$(date +"%Y%m%d%H%M%S")
|
|
cp -r .git_public .gitConfigBackups/.git_public_$(date +"%Y%m%d%H%M%S")
|
|
cp -r .git_private .gitConfigBackups/.git_private_$(date +"%Y%m%d%H%M%S")
|
|
|
|
# save current changes from .gitignore to .gitignore_private file
|
|
cp .gitignore .gitignore_private
|
|
|
|
# copy .gitignore_public to .gitignore file
|
|
cp .gitignore_public .gitignore
|
|
|
|
# remove current .git folder
|
|
rm -rf .git
|
|
|
|
# copy .git_public to .git folder
|
|
cp -r .git_public .git
|
|
|
|
# save current flag
|
|
touch .iAmPublicRepo
|
|
rm .iAmPrivateRepo |