git的用法

git的服务器不参与开发,只是保存git的增删改的记录

1.git是一个分布式版本控制器

2.Linux 命令
cd 进入到文件夹的目录
clear 清屏
touch 创建文件
open 打开文件
pwd 查看当前文件夹目录

3.显示隐藏文件夹的命令
defaults write com.apple.finder AppleShowAllFiles -bool true

4.git 常用命令

第一步:创建git仓库

git init 创建本地仓库
git init —bare 创建远程服务器

第二步:设置服务器的忽略列表

将以下命令全部粘贴到面板上:

echo -e "# Xcode

#

build/

*.pbxuser

*.mode1v3

*.mode2v3

*.perspectivev3

xcuserdata

*.xccheckout

*.moved-aside

DerivedData

*.hmap

*.ipa

*.xcuserstate

# CocoaPods

#

# We recommend against adding the Pods directory to your .gitignore. However

# you should judge for yourself, the pros and cons are mentioned at:

# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control

#

# Pods/" > .gitignore

第三步设置git用户信息
lanoudegzitong8:服务器 lan$ git config user.name SevenTong

lanoudegzitong8:服务器 lan$ git config user.email 1519468638@qq.com



全局的配置:

lanoudegzitong8:服务器 lan$ git config --global user.name SevenTong
lanoudegzitong8:服务器 lan$ git config --global user.email 1519468638@qq.com

你可能感兴趣的:(git的用法)