Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active December 22, 2015 04:49
Show Gist options
  • Save tkuchiki/6419579 to your computer and use it in GitHub Desktop.
Save tkuchiki/6419579 to your computer and use it in GitHub Desktop.
git svn で branch を切って、svn の branch の向き先を変更する
# svn の branch 作成
# git svn branch BRANCH_NAME
$ git svn branch test-branch
# remote branch 確認
$ git branch -r
test-branch
trunk
# チェックアウト
# git checkout -b LOCAL_BRANCH REMOTE_BRANCH
$ git checkout -b test-branch test-branch
# 上記のコマンドを1回でできる(らしい)
# http://archive.aerial.st/archive/2011/08/22/git-svn-remote
$ git checkout -b LOCAL_BRANCH remotes/REMOTE_BRANCH
# 確認
$ git svn info
Path: .
URL: https://example.com/svn/project/branches/test-branch
Repository Root: https://example.com/svn/project
Repository UUID: xxxxxxxx-yyyy-zzzz-aaaa-bbbbbbbbbbbb
Revision: 1
Node Kind: directory
Schedule: normal
Last Changed Author: tkuchiki
Last Changed Rev: 1
Last Changed Date: 2013-09-03 12:35:21 +0900 (火, 03 9 2013)
# コミット
$ git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment