commit
Commits the current patch. You must have resolved any conflicts that were introduced during the patch application from the rebase next invocation.
Signature
ts
class Rebase {
commit(options: RebaseCommitOptions): string;
}Parameters
- optionsrequired · RebaseCommitOptions
Options for committing the patch.
- authorSignaturePayload
Signature for author. To keep the author from the original commit leave this as empty.
- emailrequired · string
Email on the signature.
- namerequired · string
Name on the signature.
- timeOptionsSignatureTimeOptions
- offsetnumber
Timezone offset, in minutes
- timestamprequired · number
Time in seconds, from epoch
- offsetnumber
- emailrequired · string
- committerrequired · SignaturePayload
Signature for commiter.
- emailrequired · string
Email on the signature.
- namerequired · string
Name on the signature.
- timeOptionsSignatureTimeOptions
- offsetnumber
Timezone offset, in minutes
- timestamprequired · number
Time in seconds, from epoch
- offsetnumber
- emailrequired · string
- messagestring
To keep the message from the original commit leave this as empty.
- authorSignaturePayload
Returns
- string
The commit ID of the commit that was created.
Examples
ts
import { openRepository } from 'es-git';
const repo = await openRepository('.');
const rebase = repo.rebase(...);
const sig = { name: 'Seokju Na', email: 'seokju.me@toss.im' };
for (const op of rebase) {
rebase.commit({ committer: sig });
}