LoginSignup
0
0

More than 5 years have passed since last update.

gitのメモ

Posted at

ブランチの一覧

git branch -a

現在のブランチ確認

git branch

ブランチを切る

git push -u origin 作成したブランチ名

ブランチを切り替える

git checkout ブランチ名

フェッチ

git fetch origin #リモートリポジトリの最新情報取得

リベース

git checkout ブランチ名
git rebase master

スタッシュ

引用元:色々な git stash - Qiita

git stash                    #メッサージなし
git stash save 名前 #メッサージ付き

スタッシュリスト

git stash list

n番目のスタッシュを確認

git stash show stash@{N}

スタッシュを適用

git stash apply # 最新のスタッシュを適用し、残す
git stash apply stash@{N} # N番目のスタッシュを適用し、残す

スタッシュを適用し、スタッシュを削除

git stash pop # 最新のスタッシュを適用し、削除 
git stash pop stash@{N} # N番目のスタッシュを適用し、削除
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