git-svn — 让git和svn协同工作 【工具版】

background

My company is using SVN to be code management tool. I have no rights to commit, and I must export the different files to my leader to commit. For my local work conveniently , I need a local repository. So I research git and svn, and find they can cooperate.

Environments prepare

• Download and Install Git
https://git-scm.com/
• Download and Install SmartGit
http://www.syntevo.com/smartgit/
• Download and Install TortoiseGit
https://tortoisegit.org/

Clone project

  1. Open SmartGit , click the navigation : Repository -> Clone…

    这里写图片描述
    这里写图片描述
    这里写图片描述
    Noted, there are two patterns. The first is to clone all versions, and the second is to clone from the specified version. The second spends less time, which applies for cloning branch temporally, such as for bug fix.

Local develop using git

  1. Pull the latest code
    Click the repository, and click Pull button.
    这里写图片描述
    2.Save local change
    Select the changed files, and click Commit button
    这里写图片描述
    Input some message to mark
    这里写图片描述
    There are no changed files any more. If you want to look the detail, click the button Log.
    这里写图片描述
    There are some other useful functions besides mentioned, and you can try to use it.

Export the changed files

As SmartGit has no export function, I exported the changed files by TortoiseGit.
1.In project root directory, right click TortoiseGit -> Show log
• If you want to export in one commit, please select the commit in the log, and execute like below.
这里写图片描述
• If you want to export many commits, you need to combine these commits first like below, and then export like export one commit.
这里写图片描述

发布了37 篇原创文章 · 获赞 9 · 访问量 19万+

猜你喜欢

转载自blog.csdn.net/zzyymaggie/article/details/52817510