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

GitHub 別リポジトリに push する方法

【経緯】

別プロジェクトで作った機能を一部スピンオフして一つのアプリケーションにしたいと言う要望があったため、アプリケーションを別リポジトリにpushすることとなりました。

【準備】

取り込み元 https://github.com/moto/torikomi_moto.git
取り込み先 https://github.com/saki/torikomi_saki.git

【実際のコマンド】

1: $ git clone https://github.com/saki/torikomi_saki.git
2: $ cd torikomi_saki
3: $ git remote add torikomi_repo https://github.com/moto/torikomi_moto.git
4: $ git pull torikomi_repo master
5: $ git add .
6: $ git commit -m 'get torikomi_moto'
7: $ git remote rm torikomi_repo
8: $ git push origin master

1)$ git clone https://github.com/saki/torikomi_saki.git
一旦取り込み先のリポジトリをcloneする

2)$ cd torikomi_saki
取り込み先のディレクトリへ移動

3)$ git remote add torikomi_repo https://github.com/moto/torikomi_moto.git
取込元をremoteに登録

4)$ git pull torikomi_repo master
torikomi_repoからマスターにpull

5)$ git add .
6)$ git commit -m 'get torikomi_moto'

7)$ git remote rm torikomi_repo
torikomi_repoを削除

8)$ git push origin master

5,6,8については add して commit して push

Why do not you register as a user and use Qiita more conveniently?
  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
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