LoginSignup
0
1

More than 5 years have passed since last update.

Git逆引きメモ

Last updated at Posted at 2017-03-09

必要に迫られたGit関連の逆引きメモになります。

Windows版Gitで認証情報の確認

  1. コントロール パネルユーザー アカウント資格情報マネージャーを起動
  2. Windows資格情報を表示
  3. git:で始まる認証情報を確認

リモートリポジトリの確認

git remote -v

リモートリポジトリを変更

# git remote set-url リポジトリ名 URL
# ex.
git remote set-url origin http://test.com/group/example.git

git-svnでユーザをマッピング

authors.txtを作成

test1 = test1 <test1@test.com>
test2 = User1 <test2@test.com>

-A オプション

git svn clone -A authors.txt -s --prefix=svn/ svn://test.com/test/

SVNからGitへの移行

git-svn

下記コマンドで移行したいリポジトリをローカルに取得。

git svn clone -A authors.txt -s --prefix=svn/ svn://test.com/test/

※-Aオプションはユーザの紐付け。

Gitリポジトリへ

移行先のGitリポジトリを作成して、下記のコマンドを実行。

git remote add origin http://test/test.git
git push origin --all # すべてのブランチをpush
git push origin --tags # すべてのタグをpush

参考

0
1
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
1