简体   繁体   English

如何在 React Native 项目中真正进行团队合作?

[英]How to really work in team on React Native project?

How do you work in team on react native projects?你如何在团队中进行 React Native 项目的工作?

I'm working in Team of 2 people and having a lot of issues with working on the same project.我在 2 人团队中工作,并且在处理同一个项目时遇到了很多问题。

I don't understand how to properly create an environment so we can sync our code between each other while working on the same project.我不明白如何正确创建一个环境,以便我们可以在处理同一个项目的同时在彼此之间同步我们的代码。 Now, we create a git repo with /ios and /android folders, but the thing is: the /ios folder always needs to be changed, because it links to the computer that was last building the project.现在,我们使用/ios/android文件夹创建一个 git repo,但问题是: /ios文件夹总是需要更改,因为它链接到上次构建项目的计算机。

For example: we are working at the same time on different .js files and add a new npm dependency and we wish to sync our changes, so we commit changes to the Git repo and try to sync, this is where our pains begin.例如:我们同时处理不同的.js文件并添加新的npm依赖项,我们希望同步我们的更改,因此我们将更改提交到 Git 存储库并尝试同步,这就是我们的痛苦开始的地方。

The one need downloading the changed has to go to Xcode and manually update all the Framework Search Paths, Header Search Paths, delete libraries that Xcode doesn't see and then add them again.需要下载更改的必须转到 Xcode 并手动更新所有框架搜索路径、标题搜索路径,删除 Xcode 看不到的库,然后再次添加它们。

I know it's moreof an Xcode problem, but I didn't see any detailed guide about team syncing in projects.我知道这更多是 Xcode 问题,但我没有看到任何关于项目中团队同步的详细指南。 I know that at Facebook people are doing a lot of cooperative work and I'd appreciate some input over our issues!我知道在 Facebook,人们正在做很多合作工作,我很感激就我们的问题提供一些意见!

If you are using git, you can configure your .gitignore-file to prevent committing xcode-specific stuff and other configuration files.如果您使用 git,您可以配置 .gitignore 文件以防止提交特定于 xcode 的内容和其他配置文件。

I can highly recommend gitignore.io , which is a "web service designed to help you create .gitignore files for your Git repositories " [Source] .我强烈推荐gitignore.io ,这是一个“旨在帮助您为 Git 存储库创建 .gitignore 文件的网络服务[来源]

You can for example type in XCode (or AndroidStudio, ReactNative, Gradle, etc.) and it will automagically generate a .gitignore file for you.例如,您可以输入 XCode(或 AndroidStudio、ReactNative、Gradle 等),它会自动为您生成一个 .gitignore 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM