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でローカルの変更をリモートリポジトリへ反映させる方法

Posted at

Gitでローカルの変更をリモートリポジトリへ反映させる方法

ローカルリポジトリからコードをGitでcloneした後、create.blade.phpの内容を一部変更しました。
この変更をmainブランチでリモートリポジトリへ反映させる手順を説明します。


1.png

1. 変更をステージングする

まず、変更をステージングするために以下のコマンドを実行します。

git add resources/views/post/create.blade.php

このコマンドを実行すると、「ステージされている変更」が更新されます。
スクリーンショット 2025-03-12 22.50.45.png


2. 変更をコミットする

続いて、以下のコマンドで変更をコミットします。

git commit -m "create.blade.phpの修正"

3. 変更をリモートリポジトリへプッシュする

最後に、リモートリポジトリへ変更を反映させるために、以下のコマンドを実行します。

git push origin main

この際、Gitのpassphraseを求められます。
スクリーンショット 2025-03-12 23.27.22.png


4. 変更が反映されたことを確認

Github上でリモートリポジトリh変更が反映されたことを確認できました。
スクリーンショット 2025-03-12 23.28.23.png

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?