Skip to content

Stash

Stash operations are available via repo.stash.

let author = Signature(name: "Alice", email: "alice@example.com")
try repo.stash.push(message: "WIP: login screen", author: author)
let stashes = try repo.stash.list()
for entry in stashes {
print(entry.index, entry.message)
}

Apply without removing it from the stash list:

try repo.stash.apply(index: 0)

Apply and remove from the stash list:

try repo.stash.pop(index: 0)

Remove without applying:

try repo.stash.drop(index: 0)
public struct StashEntry: Sendable, Identifiable {
public let index: Int
public let message: String
public let oid: OID
}