最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[记录]创建swift的项目JianDao2并上传到OSChina的git仓库

Git crifan 2447浏览 0评论

注:此处的Bundle ID先大概填写一下,随后会更新的。

然后修改一些属性:

 然后尝试去提交代码到git的oschina上面去:

把之前的,gitignore的内容:

UserInterfaceState.xcuserstate
WorkspaceSettings.xcsettings
xcdebugger
*.xcbkptlist
*.DS_Store

合并到现在的项目的gitignore

改为:

.gitignore文件:

# Xcode
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
UserInterfaceState.xcuserstate
WorkspaceSettings.xcsettings
xcdebugger
*.xcbkptlist
*.DS_Store
#CocoaPods
Pods

重新去提交:

希望可以自动已经过滤掉那些

WorkspaceSettings

之类的东西了。

结果还是存在:

但是:

可以更新.gitignore内容

难道是:

只有这次更新之后,.gitignore才能生效?

不过好像的确已经生效了

上面要过滤掉的:

WorkspaceSettings.xcsettings

不是此处要上传的

Workspace Settings

然后去提交

需要填写用户名和密码:

然后就上传成功了:

然后oschina上面就可以看到更新了:

后来,又去更新

.gitignore

为:

#Mac specific
*.DS_Store
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
WorkspaceSettings.xcsettings
#debug related
xcdebugger
*.xcbkptlist
## Other
*.moved-aside
*.xcuserstate
UserInterfaceState.xcuserstate
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
# 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/
# 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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

算是包含了,相对比较常用的配置了。

把和开发不相关的其他内容都过滤了。

转载请注明:在路上 » [记录]创建swift的项目JianDao2并上传到OSChina的git仓库

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.196 seconds, using 22.12MB memory