0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

既存のプロジェクトと新たなリモートリポジトリをリンクさせる方法

Last updated at Posted at 2025-01-13

1. 既存のプロジェクトのフォルダをGitリポジトリにする

既存のプロジェクトのフォルダをGit Bashで開き、

git init

でGitリポジトリにする。

2. リモートリポジトリと結びつける

作成したリモートリポジトリのリンクをコピーし、

git remote add origin [リモートリポジトリのリンク]

でリモートリポジトリと結びつける。

3. リモートリポジトリにpushする

git checkout -b main

でmainブランチを作成し、

git add . 

ですべての変更をステージング

git commit -m "Initial commit"

でコミットして、

git push -u origin main

でリモートリポジトリに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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?