Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of Carthage files to be pushed to git

Tags:

git

carthage

What are the list of Carthage related files which are good if pushed to git. I know, - Cartfile - Cartfile.private - Cartfile.resolved

What about the Build and Checkout folders?

like image 961
Vinuta Avatar asked Nov 07 '25 22:11

Vinuta


2 Answers

From this link:

Whether you commit the Build and Checkouts directories to your version control repository is entirely up to you. It’s not required, but doing so means that anybody who clones your repository will always have the binaries and / or source for each dependency available.

This can be a useful insurance policy of sorts, for example, if Github is unavailable or a source repository is removed completely then you’d have a clean backup.

I think it's best to commit the Build and Checkout directories to git. If you don't and someone clones your repository they will be forced to rebuild the Carthage binaries. Depending on the Cartfile what they build may be different to what was tested by you before you last committed to the repository. For example, let's assume the Cartfile in the git repository has the line github "CocoaLumberjack/CocoaLumberjack" ~> 3.2. Assume when you tested your code and committed the Cartfile the latest version of CocoaLumberjack was 3.2.0. Now assume 2 months later someone clones your repository and is forced to rebuild the binaries but at that time the CocoaLumberjack latest version is 3.2.3. This person will end up with different code to what you tested. They may not realise it's different.

like image 105
pbm Avatar answered Nov 09 '25 12:11

pbm


If you don’t commit the Ford, you should use carthage bootstrap instead of update — it will use the versions specified in the Cartfile.resolved.

like image 21
Reid Ellis Avatar answered Nov 09 '25 11:11

Reid Ellis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!