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?

Git Clone から編集まで(VSCode環境)

Last updated at Posted at 2025-01-20

Github & VSCodeのインストール

Gitを使うまで

1, GitHubのアカウントを作成

2, GitHubのインストール
ダウンロードから任意のOSを選択し、64-bit Git for Windows Setupを選択(基本的には)
スクリーンショット 2025-01-19 191623.png

3, インストール後、Git Bashというアプリが使えるようになる
以下のようにして初期設定を行う

git config --global user.name "あなたの名前"
git config --global user.email "あなたのメールアドレス"

VSCodeを使うまで

1, VSCodeをインストール
Windowsの場合[Windows」のボタンをクリック

2, ダウンロードしたインストーラー(VSCodeUserSetup-x64-xxx.exe)をダブルクリックして起動

Git関連の拡張機能をインストールしておこう

VSCodeを起動し、左の「拡張機能」アイコンをクリック
検索バーに「Git」と入力し、「GitLens」などの拡張機能をインストール
拡張機能がインストールされると、VSCode内でGitの履歴管理やコミット操作が簡単にできる

VSCodeのターミナルからgit cloneを行う

VSCodeのターミナルを開く
スクリーンショット 2025-01-19 193459.png

git clone コマンドを使ってGitのURLをクローン

スクリーンショット 2025-01-19 193626.png

git clone https://github.com/username/repository.git

Gitの任意のブランチを選択して作業を進める

ソース管理を選択
スクリーンショット 2025-01-20 124748.png

左下にあるmain(今回はdevになっている)を選択し、編集したいブランチ、リモートブランチに移動
リモートブランチはPC上に保存されていないGitのクラウド上のもの
スクリーンショット 2025-01-19 194132.png
スクリーンショット 2025-01-19 194145.png

gitブランチとは

Gitにおけるブランチは、プロジェクトの独立した開発ラインを管理するための機能である
ブランチを使うことで、メインのコード(通常はmainまたはmasterブランチ)の内容を変更することなく、新しい機能の開発や修正を行うことができる

「コミット(セーブポイント)の分岐を作る」機能で、その分岐を「ブランチ」と呼んでいる

この図ではmasterをもとにしたdevelopブランチを作成している
gitflow-768x372.png
Gitで始めるバージョン管理

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?