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?

More than 3 years have passed since last update.

【リファレンス】よく使うGitコマンド

Posted at

編集済みファイルをステージング

git add -A

ステージングされたファイルをコミット

git commit -m "comment"

リモートリポジトリにアップ

git push origin <ブランチ名>

リモートリポジトリからダウンロード

git pull origin <ブランチ名>

ブランチ切り替え

git checkout <ブランチ名>

管理対象から指定したファイルのキャッシュを削除

git rm --cache <ファイル名>

管理対象から指定したディレクトリのキャッシュを削除

git rm --cache -r <ディレクトリ名>

管理対象から全てのファイルのキャッシュを削除

git rm --cache -r .

作業ブランチに指定したブランチをマージ

git merge <マージしたいブランチ名>

作業ブランチに指定したコミットのみをマージ

git cherry-pick <コミットID>

一時的に退避

git stash

一時的に退避したものを適用

git stash pop
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?