android-version control git and SVN

Source: Internet
Author: User
Tags diff

android-version control git and svn One version control
Versioning is a software engineering technique that ensures that the same projects that are edited by different people are updated during development.

History of the two-version control
Version-controlled mode

Local version control

Centralized version control (SVN)

Distributed version Control (GIT)

version-controlled usage history
2 VSS CVS (concurrent and atomic commits not supported)
3 CLearCase, SVN, perforce, TFS
4 Mercurial (Mercury), Git

Three-version control-SVN
1 SVN architecture
Single-machine structure, local file system, network structure, c/s structure, b/s structure

2 SVN storage structure
SVN repository (Repository): Save each version of the software resource, record the history of the version update, maintain the version branch
Local working directory (working directory): Where to develop

3 Configuring SVN
1 Installing the SVN Service
2 Installing TORTOISESVN

The corresponding tool links are available here:


Install default installation, simple

4 How to work with SVN
1 Update the latest code from the server
2 Develop your own branch and submit code once every one hours to the server
3 Finally, your own branch is merged onto the main branch and reflected to the server

5 Common features
Import imports: Import files to the local warehouse without the. svn file
Export: Export files from the warehouse without the. svn file
Check out Checkout: Extract files from warehouse with. svn files
Check in Checkin: Extract the files to the repository and execute them under. svn
Modify EDIT: Checkout the file to local, then modify
Added directory and file add: Add a file in the workspace. SVN folder before committing
Submit to warehouse after submitting Commit:add
Update: Update all files from the repository now
Remove Delete: Delete file, delete after commit can be completely deleted
Cleanup Clearup: Cleanup status and other information
Lock the Get Lock: Lock the file at the same moment, the value allows one person to access
Unlock release Ulock: Unlock a file
Backup: Export from server first, then package backup
Undelete revert: Accidentally deleted the file, with this recovery
Merge Branch Merge: Merge your own branch with the main branch
Create branch switch: Re-establish a branch that works in this branch without affecting the main branch of the file

Four-version control-git
1 history
Git is an open source version management system developed by Linux founder Linux Torvalds and also a source code management system (SCM)

2 git architecture

Three states of a git file

commited: Files stored in your local
Modified: Modified file, but not submitted to your warehouse
Staged: A snapshot of the next version of a modified file has been marked


Each version of Git changes, leaving the previous snapshot, and later, if you want to go back to a version, a snapshot of a version of the direct zone can be
, Git is also like a small file system, snapshots are git faster than SVN

3 Git's development process
1 Cloning a database to a PC
2 Create your own branch, modify the code
3 committing code on a branch that you create on your PC
4 Merging your own branches
5 Create a new branch, fetch the latest server code, and then merge with your main branch,
6 patch patches are generated and sent to the main developer

44 regions
1 bless (remote) repository repository: remote server
2 Local repository repository: Distributed structure makes local also have a warehouse, name is. Git (hidden file)
3 Stage Area temporary workspace: For example, if you add a file that is not committed, the file is added in the temporary workspace
4 Work Area local workspace: The same directory as the. Git folder is the local workspace

5 Installing the GIT environment
1 git
2 Tortoisegit
Tool Links:
6 Common git operations
Git init initializes the current directory as a workspace
git remote [-v] to get the repository properties
Git checkout--file check out file
git diff compare workspace file differences
git diff--cached Compare file differences for Scratch workspaces
git diff--staged
Git branch get the current branch
git fetch ORGINL from a remote fetch file in a new folder
Git pull orginl extracts files from remote, does not generate folders, just updates
git whatchanged view Changes
git log View Log
git push orginl branch (master) pushes from current branch to remote, requires permission
git push--progress origin master pushes from the master branch to the remote, requires permission
Git Status View status
git add add
git commit file-m comment submission
git clone URL clone repository for downloading source code
echo "Test.dll" >. Gitinore add test.dll to ignore file
git checkout Chengzhi Change work Branch
Git merge Comment HEAD branch merge with Main branch or git checkout master git pull. branch1

The difference between five svn and git
c/S structure distributed
Client only work area client has workspace and local warehouse
Inconvenient offline operation can be offline all the time
Slow speed fast
Checkout Clone,pull,fetch
SVN branch is to build a new directory Git branch not
Update Checkout
Commit push
Delete RM

android-version control git and SVN

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: 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.