Files
tldr/pages.zh/common/git-svn.md

24 lines
571 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# git svn
> 在 Subversion 仓库和 Git 之间进行双向操作。
> 更多信息:<https://git-scm.com/docs/git-svn>。
- 克隆一个 SVN 仓库:
`git svn clone {{https://example.com/subversion_repo}} {{local_dir}}`
- 从给定修订号开始克隆一个 SVN 仓库:
`git svn clone {{-r|--revision}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}`
- 从远程 SVN 仓库更新本地克隆:
`git svn rebase`
- 从远程 SVN 仓库获取更新而不改变 Git HEAD
`git svn fetch`
- 提交回 SVN 仓库:
`git svn commit`