Skip to content

Commit 4a6459d

Browse files
committed
Adding save-code.sh
to store into my other Git hosting account 😃
1 parent 6878f36 commit 4a6459d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.gitattributes export-ignore
33
.gitignore export-ignore
44
phpunit.xml.dist export-ignore
5+
save-code.sh export-ignore

save-code.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Save a git project to a specific repo (e.g. github, bitbucket, ...)
4+
function save-project-to-repo() {
5+
git remote rm origin
6+
git remote add origin $1
7+
git push
8+
}
9+
10+
declare readonly gitRemotes=(
11+
git remote add origin [email protected]:pH_7/just-http-status-codes.git
12+
[email protected]:pH-7/just-http-status-codes.git
13+
[email protected]:pH-7/JustHttpStatusCodes.git
14+
)
15+
for remote in "${gitRemotes[@]}"
16+
do
17+
save-project-to-repo $remote
18+
done

0 commit comments

Comments
 (0)