One of your teammates should clone this repository to their machine. Then, go through these steps:
- Add a
.gitignore
to the cloned directory. The Github suggested one for Swift is a good start. - Uncomment the
Pods/
line in the.gitignore
. We want to ignore the Pods directory. Trust me on this. - Add a line in the
.gitignore
that just saysSecrets.swift
(orConstants.swift
, your preference) to the.gitignore
. We want git to ignore your API keys and secrets, since this is going to be open source. Make sure the name of the Secrets file you create matches the name you enter here. - Make a new Xcode project in the cloned directory.
- Run
pod init
in the directory, and add a pod (any pod, maybe something like Snapkit) to thePodfile
. Then runpod install
. This will set up the workspace for the project, so everyone starts on the same foot. - Add a
Secrets.swift
file to your project (usingFile > New > Cocoa Class
). - In terminal, you'll probably need to do
git reset HEAD
and thengit add .
. This is just necessary when making changes to the.gitignore
. - Once you've done that, run
git status
and ensure that theSecrets.swift
file and<username>.xcuserdata
files are not in the list. - Commit!
git commit -m "Initial Commit"
- Push!
git push origin master
Now your teammates can clone this repository and start branching and coding!