ソース格納場所として、AWSのcodecommitを使っていた。
しかし、こいつがなかなか使えないやつで、通常運用する上で必要な機能がことごとく付属していない。
https://ap-northeast-1.console.aws.amazon.com/codesuite/codecommit/
というわけで、AWSでインフラを揃えたかったが、
githubに移動することにした。
codecommitからgithubへの移動はとても簡単だった。
1. githubにcodecommitでも使っていた公開鍵を登録
https://github.com/settings/keys
https://tetsuyai.hatenablog.com/entry/20110912/1315798082
$ git remote -v
$ git remote set-url <リポジトリの名前> <新しいリポジトリのURL>
$ git remote set-url origin git@github.com:xxxSSHClonexxx/xxxxxxxxxx.git
以上。
あとは、git push origin master をすれば、
githubでソースを管理できる。
逆にいえば、いつでもAWSにも戻れる。
おお。
編集履歴も全部反映されてる。
ちなみに、codecommitはソースコードから編集履歴を追えない。
参考
https://qiita.com/NaokiIshimura/items/b318ebc2daa4ec07a31e
https://bbh.bz/2019/08/30/link-cloud9-and-github/
https://rails-study.net/github/