ブランチ


追加を続行
ローカルブランチ
リファレンス
  • ブランチ
  • を作成
    	$ git branch <new_branchname>
  • 分岐遷移
  • 	$ git checkout <branchname>
  • 分岐合併
  • 	$ git merge <병합할branchname>
    削除
  • ブランチ
  • 	$ git branch -d <branchname>
    
    	same as
    
    	$ git branch --delete <branchname>
    
    	same as
    
    	$ git 
  • ブランチ名
  • を変更
    	$ git branch -m <old_branchname> <new_branchname>
    リモートストレージブランチ
    リファレンス
  • リモートストレージのブランチリスト
  • を表示
    	$ git branch -r
    	ybong@ybongui-MacBookPro minitalk % git branch -r
    	origin/HEAD -> origin/master
    	origin/debug
    	origin/ex
    	origin/master
    	origin/new
    	origin/ongoing
    (원격+로컬 저장소의 모든 branch 목록 : git branch -a)
  • リモートストレージブランチ
  • にインポートする.
    	$ git checkout -t <branchname>
    - branch 이름을 변경하여 가져오고 싶다면 
    		$ git checkout -b <생성할 branchname> <원격 저장소의 branchname>

  • リモート・リポジトリのブランチ名の変更
    	새 브랜치를 생성하고, 옛 삭제하는 것이라 생각하면 된다. (아래 과정 참고)

  • リモートストレージブランチの作成
  • 	$ git push origin <new_branchname>
    削除
  • リモートストレージブランチ
  • 	$ git push origin --delete <branchname>
    
    	same as
    
    	$ git push origin -d <branchname>
    
    	same as
    
    	$ git push origin :<branchname>
    	ybong@ybongui-MacBookPro minitalk % git push origin :ongoing 
    	To https://github.com/yeawonbong/minitalk.git
    	- [deleted]         ongoing
    1回の作成と削除
  • ブランチ
  • 	$ git push origin :<old_branchname> 		<new_branchname>
    ローカルおよびリモート・リポジトリのブランチ名の変更方法の概要
    「名前変更」を参照してください。
  • ローカルブランチの名前変更Gitブランチのmオプションを使用
    	$ git branch -m [OLD_BRANCH] [NEW_BRANCH]
  • GitHubまたはリモート・リポジトリの変更はGit Pushを使用します.
  • 	$ git push origin new_branch
    	$ git push origin --delete old_branch
  • old branchを削除し、new branchを一度にプッシュすることもできます.
  • 	$ git push origin :old_branch new_branch