Skip to content

Commit 9bae356

Browse files
committed
Give an easy way to push project updates into GitHub, BB, and GitLab
1 parent 7b8803b commit 9bae356

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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@gitlab.com:pH-7/github-readme-generator-cli.git
12+
git@bitbucket.org:pH_7/random-passcode-password.git
13+
git@github.com:pH-7/php-github-readme-generator-seo-friendly.git
14+
)
15+
for remote in "${gitRemotes[@]}"
16+
do
17+
save-project-to-repo $remote
18+
done

0 commit comments

Comments
 (0)