I have some troubles with Github:
When I am pushing my Xcode project to github, it seems that it won't push all files regarding the pods and app extensions because when I pull the project down on my other mac, I get a whole lot of errors that is not there on the original file.
Thanks in advance!
Whether or not you check in your Pods folder is up to you, as workflows vary from project to project. We recommend that you keep the Pods directory under source control, and don't add it to your . gitignore.
I suggest & recommend, not to commit pods directory(third party source integrated using Pod) in your Git/SVN repository. Here is sample source, suggesting you, what to commit and not. Pod is a dependency manager and may have so many third party libraries in it.
Podfile. lock is used to make sure that every members of the team has the same versions of pods installed on the project. This file is generated after you run the command: pod install. It gets updated when you run pod install or pod update.
After a lot of testing I found the answer. When I used the command lines in terminal for pushing the project to Github, instead of the shortcuts in Xcode, I saw that this files were not "added" to the committing (I checked this by typing: git status
). Then all I had to do was to write in Terminal: git add -A
to add all the files. I committed and pushed them to Github, and now everything is working fine!
Thanks for all the help I got!
As shallowThought is suggesting, extend your question with your .gitignore
file, so we can identify the lines that are likely preventing git from tracking the pods and extensions.
If you are unsure how to find and copy this .gitignore
file, do the following:
<your-project>.xcodeproj
selected. If you don't see the folder that contains <your-project>.xcodeproj
, press ⌘ 3
to tell Finder to View as Columns.<your-project>.xcodeproj
and instead drag the folder that contains it onto the Terminal icon (usually in the bottom of the screen). If Terminal was not there, first start Terminal; e.g. by pressing ⌘ Space
and typing Terminal..gitignore
file usually is—technically it can be in any subfolder. pbcopy < .gitignore
followed by Enter
to copy the contents of the file in your clipboard.… now post the contents in your question.
Another way to check if indeed git is not tracking your desired files is opening Terminal, and running the following command (from this answer): git ls-tree -r HEAD --name-only
If Git is not tracking the files that you require, they will not be in the list.
If you want to solve this yourself, your best bet is to remove the line from the .gitignore
file that is preventing Pods etc. to be tracked. So, you're are actually doing the opposite of this SO answer ;-)
In step 3. type open -a "TextEdit" .gitignore
followed by Enter
to open the file.
Then remove the line(s) that you don't want ignored. Save. Now you can add/commit/push the files to GitHub.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With