IOS SVN source Control tool uses

Source: Internet
Author: User

01. Source Code Control Tool Overview (PPT) ===================================================
* The role of source code management tools:
# can track a project from birth to final process
# Record all content changes for an item
# easy access to specific revisions

* If it is team development, using the source Control tool is mandatory!
* If you are a single developer, it is also highly recommended that you start using source control tools now

* Using Source Control tools
# no increase in workload due to ease of use
# does not cause any damage to existing work (bad effect)
# is a technology that a qualified software developer must master


Description: SVN introduction (PPT) =========================================================

SVN is a centralized source-code management tool

Concept:
1>Repository code warehouse, repository for saved code
2>Server servers, saving all versions of the Code warehouse
3>Client clients, save only the current user's Code warehouse
4>User name & password access code warehouse needs to use its own "User name and password", so that different people can be divided into code changes

Operation:
1> Checkout Download the latest code warehouse on the server to local, "just need to do it once"
2>Update downloads the changes made by others from the server to local, "things you have to do every day at work"
3>Commit commits the work to the server, " Do it at least once a day before work .

The SVN server installs Visual SVN server============================================


Tip: The general programmer does not have the opportunity to install the SVN server, the following information is only for the installation and configuration process on the server

* Visual SVN Server is running on Windows operating system, integrated with subversion and Apache
* Fool-type installation one step, and provide a graphical interface, easy to install simple configuration
* :http://www.visualsvn.com/server/download/

1> Installation
* Program Directory
* Code Warehouse Directory

2> Add code Warehouse "Weibo"
* Temporarily uncheck the default structure (trunk, branches, tags)

3> Adding users
* To facilitate subsequent walkthroughs, each user's password is not set to the same
# User name password
# Manager Jingli
# Zhangsan Zhang
# Lisi Li

4> add groups, through the group can set multiple users to the code warehouse access, easy to manage

5> Set Permissions Walkthrough
* Select the project's code base, right click, select "Properties"

6> Protocol
* HTTPS port 443
* HTTP Port 80

modification of the 7> protocol
* Select "VisualSVN Server", click the right mouse button, select "Properties"
* Select "Network" and tick "use secure connection" to access the server's code warehouse using the HTTPS protocol

Add: HTTPS = HTTP + SSL
Note: The concept of HTTPS for the moment do not tangle, there is an impression on it! The safe part of the course will be covered!
--------------------------------------------------------------------------------
HTTPS (Hyper Text Transfer Protocol over secure Socket Layer) is a security-targeted HTTP channel,
Simple is the security version of HTTP

HTTPS provides an authentication and encryption method of communication, and is now widely used for security-sensitive communications on the Internet, such as transaction payments

The certificate for HTTPS requires authentication, this certification is paid, the certification website http://cn.globalsign.com/

8> Browsing the code warehouse using a browser
If you use the HTTPS protocol to access in different browsers, the display will not be the same


. SVN Walkthrough Preparation ===============================================

1> Show hidden folders
# Show hidden files
$ defaults Write Com.apple.finder appleshowallfiles Yes && killall Finder
# do not show hidden files
$ defaults Write Com.apple.finder appleshowallfiles No && killall Finder

2> Create a new folder on the desktop "SVN walkthrough"
Create the following three directories in turn
# Manager
# Zhang San
# John Doe


05. Command Line Preparation ========================================================
Familiarity with command line purposes: All graphical tools are essentially encapsulation of the command line, Understanding command-line operations, and more useful for using graphical tools

1> SVN basic commands
command-line format:
SVN <subcommand> [Options] [args]
Description
SVN subcommand [options] [parameters]

Tips :
# The content contained in [brackets] is optional
# (Sub-command abbreviation)

2> Viewing Help information

$ SVN Help
View Help for all SVN commands
$ SVN Help subcommand

3> Unix Common Command Introduction (Unix Common command. m)



SNV Command-line Walkthrough

01. Download the server file to the local ===================================================


# Switch Working directory
$ CD Manager's working directory
# Checkout the code warehouse on the server
$ svn Co Http://10.0.1.15/svn/weibo--username manager--password Jingli

Tip: After Checkout (CO), the user name and password are recorded in the local code base, and subsequent operations are not specified separately

02. Manager Add File =========================================================


* SVN common commands
--------------------------------------------------------------------------------
# View Local code base status
$ SVN St
Error message: "is not a working copy", the SVN command must be used correctly in SVN's working directory.
# View SVN logs
$ svn Log
# View a log of a file
$ svn log filename
# View a log of one version of a file
$ svn log [email protected]

* Create a file
--------------------------------------------------------------------------------
# Switch to working directory
$ cd Weibo
# Create a file
$ Touch MAIN.C
# Open and write file contents
$ open MAIN.C

* Submit the file to the server
--------------------------------------------------------------------------------
# View working directory status
$ SVN St
# Add files to the local repository
$ svn Add main.c
# Submit the file to the server's repository
$ svn ci-m "added Main.c file"

"Summary"-two steps to add a file
--------------------------------------------------------------------------------
1> Adding a new file to the local code base
$ svn Add main.c
2> Submit the file you just added to the server
$ SVN ci-m "Memo Info"

Note: Be sure to develop a good habit of writing notes

03. Team members Join========================================================
1> Zhang San
$ svn Co Http://10.0.1.15/svn/weibo--username=zhangsan--password=zhang
2> John Doe
$ svn Co Http://10.0.1.15/svn/weibo--username=lisi--password=li

"Summary" So far, the construction of a project is over.
1> project preparation, usually done by project manager
2> programmers only need to bring the project co locally

Tip: Don't forget to ask your manager to assign SVN's account and password when you enter a new company

04. Zhang San Add files===================================================

# Add File Person.h person.m
$ Touch Person.h person.m
# Modify Person.h person.m
$ open Person.h
$ open PERSON.M
# Add Person.h person.m to the local code base
$ svn Add person.*
# Submit content to the server
$ svn ci-m "added Person class"


05. deleting Files ===========================================================


# Delete Files
$ SVN rm Person.h
# Commit Delete
$ svn ci-m "deleted Files"

Note: Do not use File Manager to delete files directly

06. Undo Changes ========================================================


$ svn revert person.m

07. Revert to a previous version of ===================================================

SVN up

08. Conflict resolution
(p) Postpone merger comparison
(MC) Mine-conflict Use my
(TC) Theirs-conflict use each other's

File status


SVN St Displays the file status

1th Column Status Description: Description file is added, deleted, or other modified
--------------------------------------------------------------------------------
"No modification
' A ' is added to the local code repository
' C ' conflict
' D ' was deleted
' I ' is ignored
' M ' was modified
' R ' is replaced
' X ' external definition of the created version directory
'? ' file is not added to the local repository
'! ' file is missing or incomplete (not files deleted by SVN command)
' ~ ' controlled file blocked by other files


Common UNIX Commands

Appendix: Unix Common Commands
================================================================================
1. CD Change Working directory

2. PWD Output the absolute path of the current working directory
What commands to execute in UNIX, be sure to know your current working directory

3. LS View file
$ ls Display file
$ ls-a Show All Files
$ ls-l List Display file
$ ls-la list shows all files
$ ls-g with color display

4. Touch is used to change the file access and modification time of standard UNIX programs, also used to create new files

$ touch MyFile.txt

Note: Touch does not modify the MyFile.txt content, only changes its access, modification time, if MyFile.txt does not exist, it will be created

5. Cat continuously view file contents

6. More paging to view the contents of the file

Tips:

1> need to add spaces between commands and arguments
2> If you want to use the file name in the current directory, press the TAB key to complete the input in half


IOS SVN source Control tool uses

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.