LoginSignup
0
0

More than 3 years have passed since last update.

git ローカルリポジトリとリモートリポジトリをリンクさせる

Last updated at Posted at 2020-02-06

目的

  • ローカルリポジトリとリモートリポジトリをリンクさせる方法をまとめる

実施方法

  1. ローカルリポジトリの.gitフォルダが見えるディレクトリ階層で下記コマンドを実行する。(Githubのリモートリポジトリの場合、「Clone or Download」をクリックした際のURL)
    スクリーンショット 2020-03-10 15.38.57.png

    $ git remote add origin "リモートリポジトリのURL"
    
  2. 同階層で下記コマンドを実行してリンクされたリモートリポジトリのURLを確認する。

    $ git remote -v
    >origin  リモートリポジトリのURL.git (fetch)
    >origin  リモートリポジトリのURL.git (push)
    
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