Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git初心者に対する説明の追加 #5

Open
otkrickey opened this issue Sep 29, 2023 · 1 comment
Open

Git初心者に対する説明の追加 #5

otkrickey opened this issue Sep 29, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@otkrickey
Copy link
Owner

otkrickey commented Sep 29, 2023

Gitの基本操作

ブランチの作成

git branch <branch-name>
git checkout <branch-name>

コミットする

git add .
git commit -m "コミットメッセージ"

プッシュする

git push origin <branch-name>

プルリクエストを作成

  1. GitHubリポジトリのページにアクセスし、'Pull Request'タブをクリックします。
  2. 'New Pull Request'ボタンをクリックし、ブランチと比較するブランチを選択します。
@otkrickey otkrickey added the enhancement New feature or request label Sep 29, 2023
@otkrickey otkrickey self-assigned this Sep 29, 2023
@otkrickey
Copy link
Owner Author

Git基本操作ガイド

はじめに

Gitは、プロジェクトのソースコードのバージョン管理を行うためのツールです。

基本的な概念

リポジトリ

プロジェクトのファイルと変更履歴を保存する場所です。

コミット

ファイルの変更をリポジトリに記録するアクションです。

ブランチ

プロジェクトの異なるバージョンを作成・管理するためのポインターです。

基本的なコマンド

git clone

リモートリポジトリをローカルにコピーします。

git clone <リポジトリのURL>

git status

ワーキングディレクトリの状態を表示します。

git status

git add

変更したファイルをステージングエリアに追加します。

git add <ファイル名>

git commit

ステージングエリアの変更をリポジトリにコミットします。

git commit -m "コミットメッセージ"

git push

ローカルリポジトリの変更をリモートリポジトリにプッシュします。

git push

git pull

リモートリポジトリの変更をローカルリポジトリにプルします。

git pull

git branch

ブランチをリスト表示、作成、または削除します。

git branch

git checkout

ブランチを切り替えます。

git checkout <ブランチ名>

git merge

他のブランチの変更を現在のブランチにマージします。

git merge <ブランチ名>

まとめ

これらの基本的なコマンドと概念を理解することで、Gitを使ってプロジェクトのバージョン管理を効果的に行うことができます。

このドキュメントは、Gitの基本的な概念とコマンドを説明するための簡単なガイドとして作成されています。さらに詳しい情報や実践的な例が必要であれば、公式のGitドキュメントや他のオンラインリソースを参照してください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant