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
Clone project
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
- 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.