使用git管理svn

文档:https://git-scm.com/docs/git-svn

常用操作

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 下载一个 SVN 项目和它的整个代码历史,并初始化为 Git 代码库
git svn clone [repository]

# 从第10个版本开始检出
git svn clone -r10:HEAD [repository]

# 查看当前版本库情况
git svn info

# 取回远程仓库所有分支的变化
git svn fetch

# 取回远程仓库当前分支的变化,并与本地分支变基合并
git svn rebase

# 上传当前分支的本地仓库到远程仓库
git svn dcommit

# 拉取新分支,并提交到远程仓库
svn copy [remote_branch] [new_remote_branch] -m [message]

 

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×