Takuya Miyashita
This site
Web
Start:
*ブランチに関する設定 [#vf0e3a64]
***ブランチを確認する [#dc48d807]
#codeprettify{{
git branch -a
}}
により,ローカルにあるブランチとリモートリポジトリの追跡...
以下のように表示される.*が付いているものがローカルで現在...
another_branch
* master
remotes/origin/HEAD -> origin/master
remotes/origin/another_branch
remotes/origin/master
リモートリポジトリが更新されている場合は,
#codeprettify{{
git fetch origin
}}
の後に実行しないと最新の表示とはならない.
***新規にブランチを作成する [#p6ff1741]
ブランチを作成するには,以下の1文を入力する.
#codeprettify{{
git branch newbranch
}}
この場合,作成されるのみで,現在のものが移動するわけでは...
***ブランチを変更する [#s4c22938]
既存のブランチに入るには,以下の1文を入力する.
#codeprettify{{
git checkout newbranch
}}
***現在のブランチを抜け,新しいブランチに変更する [#na453...
上記2つのブランチ新規作成と変更を一度に行いたい場合は,下...
#codeprettify{{
git checkout -b newbranch
}}
***ローカルで作成したブランチをリモートリポジトリへ送信 [...
ローカルで新しく作成した後,単なる git push だけでは,新...
#codeprettify{{
git push origin newbranch
}}
***ローカルブランチの削除 [#le629361]
devブランチを削除したい場合
#codeprettify{{
git branch -d dev
}}
***リモートブランチの削除 [#b18f9ea3]
リモートリポジトリのブランチを削除する場合は,branchコマ...
#codeprettify{{
git push origin :dev
}}
または
#codeprettify{{
git push --delete origin dev
}}
End:
*ブランチに関する設定 [#vf0e3a64]
***ブランチを確認する [#dc48d807]
#codeprettify{{
git branch -a
}}
により,ローカルにあるブランチとリモートリポジトリの追跡...
以下のように表示される.*が付いているものがローカルで現在...
another_branch
* master
remotes/origin/HEAD -> origin/master
remotes/origin/another_branch
remotes/origin/master
リモートリポジトリが更新されている場合は,
#codeprettify{{
git fetch origin
}}
の後に実行しないと最新の表示とはならない.
***新規にブランチを作成する [#p6ff1741]
ブランチを作成するには,以下の1文を入力する.
#codeprettify{{
git branch newbranch
}}
この場合,作成されるのみで,現在のものが移動するわけでは...
***ブランチを変更する [#s4c22938]
既存のブランチに入るには,以下の1文を入力する.
#codeprettify{{
git checkout newbranch
}}
***現在のブランチを抜け,新しいブランチに変更する [#na453...
上記2つのブランチ新規作成と変更を一度に行いたい場合は,下...
#codeprettify{{
git checkout -b newbranch
}}
***ローカルで作成したブランチをリモートリポジトリへ送信 [...
ローカルで新しく作成した後,単なる git push だけでは,新...
#codeprettify{{
git push origin newbranch
}}
***ローカルブランチの削除 [#le629361]
devブランチを削除したい場合
#codeprettify{{
git branch -d dev
}}
***リモートブランチの削除 [#b18f9ea3]
リモートリポジトリのブランチを削除する場合は,branchコマ...
#codeprettify{{
git push origin :dev
}}
または
#codeprettify{{
git push --delete origin dev
}}
Page:
Edit with a page name which already exists