Created
January 5, 2020 16:18
-
-
Save hisasann/2d722c72e0b41be8d56c1c5461ac2ae3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
originの状態を確認する | |
git remote show origin | |
pullやpushがどう紐付いているか確認できる | |
ローカルに作ったブランチをリモートに反映 | |
git push origin feature/a | |
リモートから削除されたブランチをローカルにも反映 | |
git fetch -p | |
これも同じみたい(プル?ン) | |
git remote prune origin | |
リモートブランチを削除する(空ブランチを送信して削除する) | |
git push origin (local branch を指定しない=空):remotebranch | |
いらないローカルブランチを削除する | |
git branch -d oldbranch | |
強制する場合は -D | |
ローカルのリモートトラッキングブランチの削除(remotesは冒頭にはつけない) | |
git branch -r -d origin/feature/1_min_befor | |
どこからpullするかを表示してpull | |
git pull -v | |
ローカルブランチとリモートブランチをひもづける(-u は --set-upstream-to=) | |
git push -u origin new_br | |
git pullがやっていること | |
git fetch | |
リモートブランチの最新ををローカルのトラッキングブランチに反映 | |
git checkout master | |
git merge origin/master | |
トラッキングブランチ(remotes/origin/master)からmergeしている | |
コミットをまとめる、ただし--no-ffとは併用できない | |
git merge --squash issue1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment