iOS开发中的源代码管理工具

2017-02-18  本文已影响0人  小白文_Vincent

<h4>源代码管理工具的起源</h4>

<h4>源代码管理工具的作用</h4>

<h4>常见的源代码管理工具</h4>


<h4>SVN</h4>


状态说明:描述文件被添加、删除或其他修改
' '   没有修改
'A'   该文件已经添加到svn的管理之下,但是该文件在本地,并未提交到服务器
'C'   冲突
'D'   被删除
'I'   被忽略
'M'   被修改
'R'   被替换
'X'   外部定义创建的版本目录
'?'   文件没有被添加到本地版本库中,不在svn的管理之下
'!'   文件丢失或者不完整(不识别该文件)
'~'   受控文件被其他文件阻隔
'U'   更新最新的代码到本地(本地有文件的情况下)
'G'   产生冲突后,更新操作去解决冲突,相当于进行合并

二、李四加入开发(新员工)
1>需要想项目经理要一些东西

*注意:如何避免冲突




<h4>Git</h4>






















pick 9a54fd4 添加commit的說明
pick 0d4a808 添加pull的說明

# Rebase 326fc9f..0d4a808 onto d286baa
#
# Commands:
#  p, pick = use commit
#  r, reword = use commit, but edit the commit message
#  e, edit = use commit, but stop for amending
#  s, squash = use commit, but meld into previous commit
#  f, fixup = like "squash", but discard this commit's log message
#  x, exec = run command (the rest of the line) using shell
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#

将第二行的“pick”改为“squash”,存储后并推出,由于合并后要提交,所以编辑器会提示您编辑这个最新的提交讯息,请编辑讯息后存储并提出,
这样,两个提交就合并成一个提交了,请使用log命令确认历史记录

修改后master分支内容.png








*
!.gitignore

git在使用中遇到的问题以及注意点:
1.由于在项目中一般为多人开发,所以在使用git的时候一定要注意:

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

上一篇 下一篇

猜你喜欢

热点阅读