美文网首页
git《团队开发》 使用 2021-04-01

git《团队开发》 使用 2021-04-01

作者: 读书有毒不中毒 | 来源:发表于2021-04-01 14:21 被阅读0次

01. 建立代码仓库(专门用于团队开发的代码仓库)

=======================================================

切换目录
$ cd /Users/Desktop/git演练/公司/weibo
建立空白代码库(专门用于团队开发)
$ git init --bare

02. 项目经理准备项目(前奏)

=======================================================

切换目录
$ cd /Users/Desktop/git演练/经理
"克隆"代码库到本地
$ git clone /Users/Desktop/git演练/公司/weibo/
个人信息配置(因为要演示一台机器上的多人协作,日常开发可以忽略)
$ git config user.name manager
$ git config user.email manager@163.com
$ touch .gitignore

.gitignore可以指定哪些文件不纳入版本库的管理

参考网址:https://github.com/github/gitignore

命令行中进入与.git同级的目录
$ cd /Users/Desktop/git演练/经理/weibo
将以下命令一次性粘贴到命令行中

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

## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.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/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# 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/**/*.png
fastlane/test_output

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

iOSInjectionProject/

将.gitignore添加到代码库
$ git add .gitignore

03. 创建项目

=======================================================

提交同时"push"到远程代码仓库

04. 新人加入

=======================================================

1.上传代码
$ git push
2.拉取代码
$ git pull

05. 分布式的代码库 - 仅供参考

=======================================================

由于git是分布式的,任何一台计算机上都保留有完整的代码库的内容,因此可以把团队开发的代码库放在任何位置

相关文章

  • git《团队开发》 使用 2021-04-01

    01. 建立代码仓库(专门用于团队开发的代码仓库) ===============================...

  • ios git的使用

    git本地操作 git团队开发操作 git分支管理 gitHub使用

  • Git使用总结

    该系列包括Git在个人开发的使用以及Git团队开发的使用 分布式版本控制工具 -> Git 首先,git是一款开源...

  • git commit (玩转提交)

    在团队开发中使用git的常用操作有 git checkout -b local_branch_name origi...

  • 优雅的git命令

    熟悉Git的基本功能和让你在开发团队中熟练的使用Git. 我们所讨论的命令足够一个开发者在Git使用方面游刃有余。...

  • Git-Flow 使用小结——解决Fatal: Not a gi

    随着团队开发成员增多,引入了git-flow的使用,初次使用遇到一些问题 一:安利一篇优质的文章: Git 在团队...

  • iOS团队开发 git使用管理

    Git iOS 多人开发 git - xcode 团队开发 iOS开发中的Git流程(动态演示)

  • Git 基本操作-学习小记

    git 基本命令使用 1. 创建Git仓库 2 注册Git仓库 用于团队开发,表名代码的作者 3. Git 仓库添...

  • Git笔记

    我的提交示例 01-GIT本地操作 02-GIT团队开发操作 03-GIT分支管理(了解) 04-GITHUB使用...

  • 基础设计

    简介 git代码团队开发项目中使用的快速开发框架。其设计目标是开发迅速、学习简单、轻量级、易扩展;使用Spring...

网友评论

      本文标题:git《团队开发》 使用 2021-04-01

      本文链接:https://www.haomeiwen.com/subject/xdetkltx.html