{"id":32147019,"url":"https://github.com/way-to-code/git-macos","last_synced_at":"2026-02-19T02:02:16.660Z","repository":{"id":43353042,"uuid":"136770131","full_name":"way-to-code/git-macOS","owner":"way-to-code","description":"A high-level swift framework based on the GIT macOS command line utility","archived":false,"fork":false,"pushed_at":"2025-06-05T13:24:08.000Z","size":613,"stargazers_count":38,"open_issues_count":6,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-02T06:51:36.921Z","etag":null,"topics":["git","macos","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/way-to-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-10T01:26:46.000Z","updated_at":"2025-10-17T05:29:31.000Z","dependencies_parsed_at":"2025-06-03T17:56:22.197Z","dependency_job_id":"d77816ad-007a-4fb2-9bd4-c02be363cad8","html_url":"https://github.com/way-to-code/git-macOS","commit_stats":{"total_commits":127,"total_committers":5,"mean_commits":25.4,"dds":"0.15748031496062997","last_synced_commit":"72a0065a440cc10fb2f0026fba126b81b468ab4b"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/way-to-code/git-macOS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/way-to-code%2Fgit-macOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/way-to-code%2Fgit-macOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/way-to-code%2Fgit-macOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/way-to-code%2Fgit-macOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/way-to-code","download_url":"https://codeload.github.com/way-to-code/git-macOS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/way-to-code%2Fgit-macOS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"online","status_checked_at":"2026-02-19T02:00:07.702Z","response_time":117,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","macos","swift"],"created_at":"2025-10-21T08:40:14.610Z","updated_at":"2026-02-19T02:02:16.648Z","avatar_url":"https://github.com/way-to-code.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git.framework\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/way-to-code/git-macOS/master/logo.png\" alt=\"A high-level swift framework to work with git command line in macOS\"/\u003e\n\u003c/p\u003e\n\nGit is a high-level swift framework based on the command line Git utility in macOS.\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Basics](#basics)\n- [Quick examples](#quick-examples)\n  - [Simple clone](#simple-clone)\n  - [Providing credentials](#providing-credentials)\n  - [Receiving the progress ](#receiving-the-progress)\n\n## Features\n\n- Cloning remote repositories (`git clone` and `git fetch`). Including shallow clone support (`--depth` option);\n- Getting the list of references (branches, tags) in repositories;\n- Checking out references (`git checkout`);\n- Working with remotes (listing, renaming, setting urls);\n- Committing local changes and pushing to a remote repository (`git commit` and `git push`);\n- Getting log records for a repository (`git log`);\n- Listing pending log records (committed locally, but not pushed yet) and upcoming log records (commited on a remote, but not presented in the working copy)\n- Working with stashes (`git stash`);\n- Basic merge (`git merge`);\n\n`Git.framework` has no dependencies. Just clone and build.\n\n## Requirements\n\n- macOS 10.13+\n- Xcode 10+\n- Swift 4.2+\n- Git for Mac 2.15+\n\n## Installation\n\nBefore installing this framework, please make sure you're using the correct version of Git in your system. You can check the current version via Terminal app:\n\n```\ngit --version\n$ git version 2.15.1\n```\n\n### Carthage\n\nTo install Carthage you can use [Homebrew](http://brew.sh/). Use the following command in Terminal app:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate Git.framework into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"way-to-code/git-macOS\" ~\u003e 3.4.0\n```\n\nRun `carthage update` to build the framework and drag the built `Git.framework` into your Xcode project.\n\n#### Swift 4.2\n\nIf you want to use `Git.framework` on **Xcode 10.1** or lower, please use version `1.5.1`\n\n```ogdl\ngithub \"way-to-code/git-macOS\" ~\u003e 1.5.1\n```\n\n### Manually\n\nYou can install Git.framework manually. Clone the project locally, build and integrate to your project as a framework\n\n### XCFramework\n\nYou may download XCFramework from the latests [release page](https://github.com/way-to-code/git-macOS/releases) and integrate it into your project.\n\nNote that XCFramework support is available [since version 3.0.0](https://github.com/way-to-code/git-macOS/releases/tag/3.0.0).\n\n### Swift Package dependency\n\nWhen you want to use Git.framework as a dependency in other package, you may follow the given example:\n\n```swift\nlet package = Package(\n    name: \"MyPackage\",\n    \n    products: [\n        .library(name: \"myProduct\", targets: [\"myTarget\"]),\n    ],\n    \n    dependencies: [\n        .package(name: \"Git\",\n                 url: \"https://github.com/way-to-code/git-macOS.git\",\n                 .upToNextMajor(from: \"3.4.0\")),\n    ],\n    \n    targets: [\n        .target(name: \"myTarget\", dependencies: [\n            .product(name: \"Git\", package: \"Git\")\n        ]),\n    ]\n)\n```\n\n## Basics\n\nRead more about `Git.framework` in the [Wiki page](https://github.com/way-to-code/git-macOS/wiki):\n- [Basics](https://github.com/way-to-code/git-macOS/wiki/Basics)\n- [Samples](https://github.com/way-to-code/git-macOS/wiki/Samples)\n\n## Quick examples\n\n### Simple clone\n\nTo clone a remote repository you need to create an object **GitRepository**\n\n```swift\nlet repository = GitRepository(fromUrl: URL(string: \"https://github.com/github/hub.git\"))\n```\nNext, just call the clone method\n\n```swift\ntry? repository.clone(atPath: \"/Users/youruser/hub\")\n```\n\n### Providing credentials\n\nYou can specify credentials for repository with a help of **GitCredentialsProvider**. If no credentials are specified, credentials from the global macOS system git config are used by default.\n\n```swift\nlet credentialsProvider = GitCredentialsProvider(username:\"user\", password:\"****\")\nlet repository = GitRepository(from: URL(string: \"https://github.com/github/hub.git\"), using: credentialsProvider)\n```\n\n### Receiving the progress \n\nYou may keep track of the clone operation progress, by setting a delegate object on repository\n\n```swift\nlet progressTracker = MyCustomObject()\n\nlet repository: GitRepository\nrepository.delegate = progressTracker\n\n// implement RepositoryDelegate protocol in order to track the events\nextension MyCustomObject: RepositoryDelegate {\nfunc repository(_ repository: Repository, didProgressClone progress: String) {\n}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fway-to-code%2Fgit-macos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fway-to-code%2Fgit-macos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fway-to-code%2Fgit-macos/lists"}