Help us understand the problem. What is going on with this article?

GitHubからGitLabへ移行しよう

More than 1 year has passed since last update.

GitHubからGitLabへ移行しよう

きっかけは、Microsoftは2018年6月4日(米国時間)に、GitHubを(約75億ドルで)買収すると発表したことだ。

1. 登録されているリモートリポジトリの確認

$ git remote -v
origin  git@github.com:~~~~~~ (fetch)
origin  git@github.com:~~~~~~ (push)

2. githubのリモートリポジトリをoriginからgithubへ変更

以下の方法Aまたは方法Bがある。

方法A. 削除と追加

リモートリポジトリの削除

$ git remote rm origin

リモートリポジトリをgithubにして追加しなおす

$ git remote add github git@github.com:~~~~~~

確認した時のURLを入れます。

GitLabのリモートリポジトリをoriginで追加する

方法B. rename

$ git remote rename origin github

3. GitLabをoriginで追加する

$ git remote add origin https://gitlab.com/~~~~~~

4. 最後に確認

$ git remote -v
origin  https://gitlab.com/~~~~~~ (fetch)
origin  https://gitlab.com/~~~~~~ (push)
github  git@github.com:~~~~~~ (fetch)
github  git@github.com:~~~~~~ (push)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした