LoginSignup
0
0

More than 3 years have passed since last update.

GitLabからGitHubへの移行したときの手順いろいろ

Last updated at Posted at 2020-11-25

1.https://github.com/new/import で色々入力してBegin importを押す

2.途中出てくるアドレスとパスワードを入力

3.(不要なブランチがいっぱいあったので移行したついでに)developブランチにマージされていないブランチを、developとmasterとreleaseブランチを除いて削除

git branch -r --no-merged origin/develop | grep -v -e develop -e master -e release | sed -e 's/origin\///g' | xargs -I {} git push -d origin {}

4.developブランチにマージされているブランチを、developとmasterとreleaseブランチを除いて削除

git branch -r --merged origin/develop | grep -v -e develop -e master -e release | sed -e 's/origin\///g' | xargs -I {} git push -d origin {}

5.変な名前のブランチ(hoge)があったので名前をfugaに修正

(hoge)$ git branch -m fuga
(fuga)$ git push origin fuga
(fuga)$ git push -d origin hoge
(fuga)$ git branch --unset-upstream

参考URL
https://dev.classmethod.jp/articles/what-github-importer-holds/
https://dev.classmethod.jp/articles/git_remove_merged_branch/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0