Swiftpack.co - Package - BinaryBirds/Git

Git (🎉)

Git is a Swift wrapper around the git command line interface.

Usage

Some basic examples:

import Git

let git = Git(path: "~/example/")
try git.run(.cmd(.initialize))
try git.run(.clone(url: "https://gitlab.com/BinaryBirds/Shell.git"))
try git.run(.cloneFrom(.github, repo: "Alamofire/Alamofire", ssh: true))
try git.run(.cloneFrom(.gitlab, repo: "BinaryBirds/Shell", ssh: false))
try git.run(.commitAll(message: "some nasty bug fixed"))
try git.run(.log(1))
try git.run(.cmd(.status))
try git.run(.cmd(.branch), args: ["-a"])
try git.run(.cmd(.pull))
try git.run(.tag("1.0.0"))
try git.run(.pull(remote: "origin", branch: "master"))
try git.run(.push(remote: "origin", branch: "master"))
try git.run(.create(branch: "dev"))
try git.run(.checkout(branch: "master"))
try git.run(.merge(branch: "dev"))
try git.run(.raw("log -2"))
try git.run(.raw("rebase -i <hash>"))

Install

Just use the Swift Package Manager as usual:

.package(url: "https://github.com/binarybirds/git", from: "1.0.0"),

⚠️ Don't forget to add "Git" to your target as a dependency!

License

WTFPL - Do what the fuck you want to.

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Releases

1.0.1 - Jan 14, 2019

Verbose mode - print raw git commands

1.0.0 - Jan 3, 2019

Just a Swift wrapper around the git command line interface.