user7097242 user7097242 - 7 months ago 77
Git Question

What to commit when using Carthage?

This is my first time using Carthage! I'm using a library called "https://github.com/LeoNatan/LNPopupController" and I got it to work on my project. The issue is I want to commit these changes but when I do I got a popup saying that a certain file was bigger then 10MB!

The question again is, What are you suppose to commit and not commit when using Carthage?

Picture of such file:

enter image description here

On source tree:

enter image description here

Answer Source

The Carthage/Carthage issue 393 covers this.

It refers to github/gitignore/Swift.gitignore as a possible example:

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts/

Carthage/Build/

This leaves Cartfile, Cartfile.private, and Cartfile.resolved to be committed.

But: do refer to the Carthage Artifacts page:

For the Checkouts folders:

You are not required to commit this folder to your repository, but you may wish to, if you want to guarantee that the built versions of each dependency will always be accessible at a later date.

So in your case, it is simpler to add Carthage/Checkouts/ to your .gitignore.
Then SourceTree won't list all those files as unstaged.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download