-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
update_repo.sh
36 lines (26 loc) · 832 Bytes
/
update_repo.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
echo Setting config
git config --global user.email "actions@circleci.com"
git config --global user.name "GitHub"
git config pull.rebase true
echo Replacing origin
git remote rm origin
git remote add origin https://gitlab.com/commento/commento.git
echo Checking out master
git checkout master
echo Branching
git branch -m master-holder
echo Fetching
git fetch
echo Checking out new master
git checkout master
echo Pulling new master from new origin
git pull origin master
echo Merging.....
git merge -s recursive master-holder --allow-unrelated-histories --no-commit
git commit -m "[skip ci] Updates from GitLab"
echo Removing new origin back to github
git remote rm origin
git remote add origin https://github.com/souramoo/commento-heroku.git
echo Pushing back changes...
git push --set-upstream origin master