"Dark Horse Android" (12) version control Svn&git

Source: Internet
Author: User
Tags git mergetool tortoisesvn

Subversion Server and client installation

Visualsvn-server-2.7.3.msi

Tortoisesvn-1.6.6.17493-win32-svn-1.6.6.msi

TortoiseSVN Basic operations and conflict demonstrations



Eclipse Plugin demo

Eclipse_svn_site-1.6.5.zip


using the svn case Demo

A research and development team developed an information system called Apollo at the beginning of the year and has released the v1.0 version. In the early days of the project, some basic code was already in place, and the research and development team worked on this base code for 3 months to release a relatively complete version of the Apollo 1.0 for sale.

As a result of good sales, the development team is working on the development of the v2.0 version.

But at this time, there are customers found v1.0 software system A serious bug, such as not timely repair will cause serious consequences.

The development team immediately arranged for some developers to fix the v1.0 version after receiving the bug report , but other developers continued to develop new features of the v2.0 version.

The developers who fixed the bug quickly stuck to the cause of the problem and fixed the problem code, and soon released the v1.1 version to the customer, thus causing no significant loss.

After the Bug fix, the developer integrates the repaired code into the development line, which ensures that subsequent releases of the future release do not have this problem again.

So the research and development team in the joint efforts of everyone to work methodically

UseSVNManagementAndroidEngineering

Git Introduction and warehouse creation

Git-1.7.9-preview20120201.exe installation Package


Git Common commands demo

1. Create a git repository

Git init--bare library name

2. Clone the resource under the user folder

git clone < warehouse directory >/g/software/repository/git/itheima < User directory >.

Note: The user directory must be empty when clone

3. create a file that is included in version control.

git add < filename >

The first execution would warn: WARNING:LF will isreplaced by CRLF in Readme.txt.

The file would have their original line endings in your working directory.

Warning Handling: User information needs to be configured

git config user.name = "Zhangsan"

git config user.email = "[Email protected]"

4. submit to the local repository.

Git commit < file name >

5. push to the remote shared repository

Git push Origin Master

6. switch users, pull up the latest files

Git pull

tortoisegit Conflict and patch demo

Tortoisegit-1.7.7.0-32bit.msi installation Package


There is a conflict after git pull :

$ git pull

Remote:counting Objects:5, done.

Remote:compressing objects:100% (2/2), done.

Remote:total 3 (Delta 0), reused 0 (Delta 0)

Unpacking objects:100% (3/3), done.

From G:/software/repository/git/itheima26

50db030. a04027a Master--Origin/master

Auto-merging Readme.txt

CONFLICT (content): Merge CONFLICT in Readme.txt

Automatic merge failed; Fix conflicts and then commits the result.

Workaround :

1.git Mergetool

After invoking the above command, you will be prompted to enter the editing method, Enter : Beyond Compare into the editor .

2. When you are finished editing . called git commit-a commit all of the current directory to the local library .

The 3.git push Origin master is submitted to the remote library .

use git to demonstrate a case

"Dark Horse Android" (12) version control Svn&git

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.