0
0

Git操作について

Last updated at Posted at 2024-07-15

Git操作について記載

※参考 兼 自身のメモ用
※随時追記

# リモートリポジトリの複製
$ git clone <URL>
# ブランチの作成(ブランチ名を指定しないと既存ブランチの確認ができる)
$ git branch ブランチ名
# ブランチの切り替え
$ git checkout ブランチ名
# ステージングエリアへの移行
$ git add
# リポジトリへのコミット
$ git commit -m "コミットメッセージ"
# amendオプション(最新のコミット情報を変更できる)
$ git commit --amend -m "コミットメッセージ"
# ブランチのマージ
$ git merge ブランチ名
# リモートリポジトリへの反映
$ git push
# ローカルリポジトリへの反映
# リモート→ローカルの追跡ブランチ
$ git fetch
# リモート→ローカルの作業ブランチ
$ git pull
# 状態確認
$ git status
# 変更履歴の確認
$ git log
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