Smartgit as SVN Bridge

Source: Internet
Author: User

This page provides a introduction to Smartgit from a SVN users perspective and shows how the SVN workflows can be PE Rformed using Smartgit:
    • Check out:cloning an SVN repository
    • Working copy:the Git Working tree
    • Commit (Part 1): Commit locally
    • Log:git commits and version history
    • Commit (Part 2): Push
    • Update:pulling changes
    • Switch:changing the current branch
    • Merge (Part 1): Merging release branches
    • Merge (Part 2): rebasing feature Branches
    • Copy (Wc-url, Url-url): Creating tags and branches
Check out:cloning an SVN repository

With Git, you don't check out a certain revision, but you clone an entire "repository". For SVN repositories, you'll get the complete version of the specific URL of your project (either a complete Su Bversion repository or a sub-directory of such a repository which contains your project, including trunk -, branches -and -directory).

This could 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, a Subversion working copy (one single revision) and the Complete Git Clone (of all revisions) is about the same size.

Working copy:the Git Working tree

Once the initial phase of Check out have completed, Smartgit would 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 is 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 would create a Git commit in your repository. It does not yet create any new revision in the SVN repository, nor does it with 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, Li Ke svn/trunk , is already present in the SVN repository. Commits which is just ancestors of local branches, like trunk , is only present in your local Git repository.

The Log is only being present, once the Check out had been finished and all revisions had been fetched.

Commit (Part 2): Push

To publish your changes, as svn commit does immediately, you has to Push your local commits back to the SVN Repositor Y 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 is now present in the SVN repository.

Until you had pushed your commits, you had 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 a local commits, either pull (and hence Rebase) Your changes onto the latest SVN commits, or yo U may just Fetch these commits and has 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 is 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, your 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 is 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 would result in a merge commits which is a core concept of Git. When pushing, it'll be translated back to the SVN property svn:mergeinfo .

Merge (Part 2): rebasing feature Branches

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

Rebase can is used for locally as well as for remotely managed feature branches. It'll 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 and feature tag milestone-1 . Read More ...

As for commits, both, branches and tags, is 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 bra Nches. This would result in a new SVN revision, for which would be branches/feature added and marked as copied from trunk . The corresponding Git branch shows up and the svn/branches/feature Log window immediately after the Push:

The Local tags do not has a remote counterpart in the Git repository. They can simply is pushed to SVN, either immediately when creating them (Add Tag Dialog) or later from the Branches-view C Ontext menu (Project window).

Smartgit as SVN Bridge

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.