Commit to git after switching to workspace and adding CocoaPods in Xcode? Commit to git after switching to workspace and adding CocoaPods in Xcode? ios ios

Commit to git after switching to workspace and adding CocoaPods in Xcode?


git add .

From the directory enclosing your Xcode project, simply execute a git add .. Documentation here.

Explanation

You likely had the following hierarchy prior pod init:

enter image description here

In all likelihood, your git setup starts at the directory enclosing .xcodeproj.

After pod install, the hierarchy did not change. You merely have more files at the same level:

enter image description here

The .xcworkspace is next to .xcodeproj, not above. You are free to execute

git add .

...followed by

git commit -m "message"

...assuming that .gitignore is set up properly, and wether or not you prefer to commit the Pods directory.