SmartGit as SVN Bridge

This page provides an introduction to SmartGit from an SVN users perspective and shows how the SVN workflows can be performed using SmartGit:

Check Out: cloning an SVN repository

With Git, you do not check out a certain revision, but you clone an entire "repository". For SVN repositories, you will get the complete version history for the specific URL of your project (either a complete Subversion repository or a sub-directory of such a repository which contains your project, including trunk-, branches- and tags-directory).

This may sound like a huge amount of data, but the initial phase of a SmartGit clone is as quick as an svn checkout. Git is efficient in storing version history: it‘s not unusual that a Subversion working copy (one single revision) and the complete Git clone (of all revisions) are about the same size.

Working Copy: the Git working tree

Once the initial phase of Check Out has completed, SmartGit will open your fully-functional Git repository in the Project window. The Git repository consists of a working treeand the entire version history (stored in the .git-subdirectory) of your repository.

Similar to SVN, SmartGit provides several commands to alter your working tree. Most of them are located in the Local- and Branch-menu. Read more ...

Commit (part 1): Commit locally

To commit your changes, use Local|Commit. This is a purely local operation and will create a Git commit in your repository. It does not yet create any new revision in the SVN repository, nor does it contact the SVN server at all.

Log: Git commits and version history

The Log window shows the commits of your local Git repository: commits which are ancestors of remote branches, like svn/trunk, are already present in the SVN repository. Commits which are just ancestors of local branches, like trunk, are only present in your local Git repository.

The Log will only be present, once the Check Out has been finished and all revisions have been fetched.

Commit (part 2): Push

To publish your changes, as svn commit does immediately, you have to Push your local commits back to the SVN repository by using Remote|Push (Project window).

The results of a Push show up in the Log window: remote branches become updated to the corresponding local branches because the commits are now present in the SVN repository.

Until you have pushed your commits, you have all freedom to rearrange them:

Update: Pulling changes

To fetch the latest revisions of other users to your local Git repository, use Remote|Pull (Project window).

If you have local commits, you may either Pull (and hence Rebase) your changes onto the latest SVN commits, or you may just Fetch these commits and have your local branch diverge from the remote branch. In the latter case, you need to Rebase your local commits onto the latest SVN commits manually.

Switch: changing the current branch

Contrary to SVN, branches and tags are native concepts of Git. Read more ...

SmartGit maps branches/ and tags/ directory of your SVN repository to Git branches and tags accordingly. Read more ...

To switch (svn switch) from one branch to another, you may use Local|Check Out or the Switch menu item from the popup menu in the Branches view (Project window).

Merge (part 1): Merging release branches

Release branches are merged from time to time to the main development line (usually trunk). In SmartGit, use Branch|Merge to perform such a merge (Project and Log window). This will result in a merge commit which is a core concept of Git. When pushing, it will be translated back to the SVN svn:mergeinfo property.

Merge (part 2): Rebasing feature branches

When using SVN, maintaining features branches requires merging from the main development line from time to time and finally performing a reintegrating merge to get the feature back into the main development line. With Git there is a more effective mechanism for that, called "Rebase": Rebase will rewrite your feature branch commits onto the latest commits of your main code base.

Rebase can be used for locally as well as for remotely managed feature branches. It will also be used to rewrite your local commits onto the latest SVN commits when Pulling.

Copy (WC-URL, URL-URL): creating tags and branches

You can create a new branch or tag simply by using Branch|Add Branch or Branch|Add Tag on a specific commit (Log window). For example, branch feature and tagmilestone-1Read more ...

As for commits, both, branches and tags, are just locally present in your Git repository after adding them. To create the branch in the SVN repository as well, use Local|Push(project window) for the current branch or Push from the Branches-view context menu (Project window) for all other branches. This will result in a new SVN revision, for which branches/feature will be added and marked as copied from trunk. The corresponding Git branch svn/branches/feature shows up in the Log window immediately after the Push:

Local tags do not have a remote counterpart in the Git repository. They can simply be pushed to SVN, either immediately when creating them (Add Tag dialog) or later from the Branches-view context menu (Project window).

时间: 2024-08-17 04:55:49

SmartGit as SVN Bridge的相关文章

lubuntu使用记录(记录才是沉淀。。。)

最近win xp停维护,小伙伴们爆发mac pro潮,好几个都配上了,这他们所谓的标配价值1.4W+,一个月就这么白干了啊... 虽然工作五年了,买房结婚有娃后就不能随他们任性了.故拿自己的上网本来练练手. 无奈我这上网本配置太低,CPU频率才1.86×2核,跑个盗版win7非常吃力.故萌生找精简操作系统的想法,多方资料,选择lubuntu操作系统是ubuntu的衍射版本,面向的就是老机器.上网本等低配硬件群体.废话不多说,零基础“百度”装机. 2015年3月7日之前: 1.自己按照网上说的,下

【转】Install SmartGit via PPA in Ubuntu 13.10/13.04/12.04/Linux Mint

原文网址:http://ubuntuhandbook.org/index.php/2013/09/install-smartgit-via-ppa-ubuntu-linux-mint/ This tutorial will show you how to install SmartGit/HG easily via PPA in Ubuntu 13.10, Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10 and Linux Mint. As you may kn

SmartGit STUDY

Git Concepts This section helps you to get started with Git and gives you an understanding of the fundamental Git concepts. Repository, Working Tree, Commit First, we need to introduce some Git-specific terms which may have different meanings in othe

SmartGit STUDY 2

The Index The Index is an intermediate cache for preparing a commit. With SmartGit, you can make heavy use of the Index, or ignore its presence completely - it's all up to you. The Stage command allows you to save a file's content from your working t

变色龙安装程序 Chameleon Install 2.2 svn 2281发布

Chameleon Install 2.2 svn 2281发布" name="image_operate_24251386496298186" alt="变色龙安装程序 Chameleon Install 2.2 svn 2281发布" src="http://s8.sinaimg.cn/mw690/001zBYBJgy6EPMI97T1a7&690" width="690" height="51

Ubuntu 及衍生版本用户如何安装 SmartGit/HG

http://www.linuxidc.com/Linux/2014-06/102621.htm Ubuntu 及衍生版本用户如何安装 SmartGit/HG 6.0.0 [日期:2014-06-03] 来源:imcn.me  作者:Linux [字体:大 中 小] SmartGit/HG 是一款开放源代码的.跨平台的.支持 Git 和 Mercurial 的 SVN 图形客户端,可运行在Windows.Linux 和 MAC OS X 系统上.可用的最新版本 SmartGit/HG 6.0.0

SmartGit/HG

SmartGit/HG 是一款开放源代码的.跨平台的.支持 Git 和 Mercurial 的 SVN 图形客户端,可运行在Windows.Linux 和 MAC OS X 系统上.可用的最新版本 SmartGit/HG 6.0.0,最近已发布. Ubuntu 及衍生系统用户安装,打开终端,使用以下命令: sudo add-apt-repository ppa:eugenesan/ppasudo apt-get updatesudo apt-get install smartgithg Debi

iOS开发——开发实战篇&版本控制SVN和Git使用详解

版本控制SVN和Git使用详解 公司的实际开发中,在天朝使用较多的还是SVN,因为SVN是集中式的,在天朝上班你们都懂的! -----------------svn----------------- 一:最常用基本步骤--- 下载(完整下载,第一次),将服务器的项目下载到本地开始开发 svn checkout ip —uaerbane=? —password=?     //这里需要add 简:co 更新仓库,服务器项目有变动的时候需要更新到本地,以免错误或者冲突 svn updata    

iOS开发- 版本控制SVN和Git使用详解

公司的实际开发中,在天朝使用较多的还是SVN,因为SVN是集中式的,在天朝上班你们都懂的! -----------------svn----------------- 一:最常用基本步骤--- 下载(完整下载,第一次),将服务器的项目下载到本地开始开发 svn checkout ip —uaerbane=? —password=?     //这里需要add 简:co 更新仓库,服务器项目有变动的时候需要更新到本地,以免错误或者冲突 svn updata               //这里的直