2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

VscodeとGithubの連携

Last updated at Posted at 2023-08-15

実はずっとGithubから逃げていたのですが、そろそろちゃんとやらなくてはと思いGithubとVscodeの連携をしてみました。

1 VSCode エクステンションのインストール:

・VSCode を開きます。
・サイドバーのエクステンションアイコン(四つの小さな四角形)をクリックします。
・検索ボックスに GitHub と入力して、公式の "GitHub Pull Requests and Issues" エクステンションを探します。
・エクステンションをインストールします。

2 リポジトリのクローン:

・コマンドパレットを開く(Ctrl+Shift+P or Cmd+Shift+P)。
・ローカル保存先のフォルダにcd..などで移動する

git clone [リモートリポジトリのURL]

3 GitHub アカウントの認証:

・コマンドパレットを開きます。
・GitHub: Sign in to GitHub と入力して選択します。
・認証の指示に従って、GitHub アカウントにサインインします。

4 Gitにコミット

VSCodeの組み込みターミナルを開きます。以下のコマンドを実行して、変更をステージングエリアに追加します:

git add .

コミットメッセージを付けて変更をコミットします:

git commit -m "初めてのコミット"

変更をリモートリポジトリにプッシュ:

git push origin main

逆にプルしたいときは

git pull origin main 
2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?