git
来源:互联网 发布:pages for windows 编辑:程序博客网 时间:2024/04/30 20:29
如果创建项目到时候,没有选择创建repository,需要以下步骤进行设置
1)进入到该项目到目录下
$ cd Matchismo
2)找到xcuserstate,并设置到忽略文件夹中
$
.
./.DS_Store
./Matchismo
./Matchismo/.DS_Store
./Matchismo/Base.lproj
./Matchismo/Base.lproj/Main.storyboard
./Matchismo/Card.h
./Matchismo/Card.m
./Matchismo/CardGameAppDelegate.h
./Matchismo/CardGameAppDelegate.m
./Matchismo/CardGameViewController.h
./Matchismo/CardGameViewController.m
./Matchismo/Deck.h
./Matchismo/Deck.m
./Matchismo/en.lproj
./Matchismo/en.lproj/InfoPlist.strings
./Matchismo/Images.xcassets
./Matchismo/Images.xcassets/AppIcon.appiconset
./Matchismo/Images.xcassets/AppIcon.appiconset/Contents.json
./Matchismo/Images.xcassets/cardBack.imageset
./Matchismo/Images.xcassets/cardBack.imageset/cardBack-1.png
./Matchismo/Images.xcassets/cardBack.imageset/cardBack.png
./Matchismo/Images.xcassets/cardBack.imageset/Contents.json
./Matchismo/Images.xcassets/cardFront.imageset
./Matchismo/Images.xcassets/cardFront.imageset/cardFront-1.png
./Matchismo/Images.xcassets/cardFront.imageset/cardFront.png
./Matchismo/Images.xcassets/cardFront.imageset/Contents.json
./Matchismo/Images.xcassets/Image.imageset
./Matchismo/Images.xcassets/Image.imageset/Contents.json
./Matchismo/Images.xcassets/LaunchImage.launchimage
./Matchismo/Images.xcassets/LaunchImage.launchimage/Contents.json
./Matchismo/main.m
./Matchismo/Matchismo-Info.plist
./Matchismo/Matchismo-Prefix.pch
./Matchismo/model
./Matchismo/model/CardMatchingGame.h
./Matchismo/model/CardMatchingGame.m
./Matchismo/PlayingCard.h
./Matchismo/PlayingCard.m
./Matchismo/PlayingCardDeck.h
./Matchismo/PlayingCardDeck.m
./Matchismo.xcodeproj
./Matchismo.xcodeproj/project.pbxproj
./Matchismo.xcodeproj/project.xcworkspace
./Matchismo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
./Matchismo.xcodeproj/project.xcworkspace/xcuserdata
./Matchismo.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad
./Matchismo.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad/UserInterfaceState.xcuserstate
./Matchismo.xcodeproj/xcuserdata
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad/xcdebugger
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/Matchismo.xcscheme
./Matchismo.xcodeproj/xcuserdata/chris.xcuserdatad/xcschemes/xcschememanagement.plist
./MatchismoTests
./MatchismoTests/en.lproj
./MatchismoTests/en.lproj/InfoPlist.strings
./MatchismoTests/MatchismoTests-Info.plist
./MatchismoTests/MatchismoTests.m
3)将文件导入到gitignore
bogon:Matchismo chris$
bogon:Matchismo chris$ cat .gitignore
Matchismo.xcodeproj/project.xcworkspace/xcuserdata/chris.xcuserdatad/UserInterfaceState.xcuserstate
Initialized empty Git repository in /Users/chris/developer/Matchismo/.git/
bogon:Matchismo chris$ git commit -m "Now under sorce control”
[master (root-commit) 3eb6864] Now under sorce control
bogon:Matchismo chris$