On this page:
git_  rebase_  abort
git_  rebase_  commit
git_  rebase_  finish
git_  rebase_  free
git_  rebase_  init
git_  rebase_  init_  options
git_  rebase_  inmemory_  index
git_  rebase_  next
git_  rebase_  open
git_  rebase_  operation_  byindex
git_  rebase_  operation_  current
git_  rebase_  operation_  entrycount
8.12

31 Rebase🔗ℹ

 (require libgit2/include/rebase) package: libgit2

procedure

(git_rebase_abort rebase)  integer?

  rebase : rebase?
Aborts a rebase that is currently in progress, resetting the repository and working directory to their state before rebase began.

procedure

(git_rebase_commit id    
  rebase    
  author    
  committer    
  message_encoding    
  message)  integer?
  id : oid?
  rebase : rebase?
  author : (or/c signature? #f)
  committer : signature?
  message_encoding : (or/c string? #f)
  message : (or/c string? #f)
Commits the current patch. You must have resolved any conflicts that were introduced during the patch application from the git_rebase_next invocation.

procedure

(git_rebase_finish rebase signature)  integer?

  rebase : rebase?
  signature : (or/c signature? #f)
Finishes a rebase that is currently in progress once all patches have been applied.

procedure

(git_rebase_free rebase)  void?

  rebase : rebase?
Frees the git_rebase object.

procedure

(git_rebase_init repo    
  branch    
  upstream    
  onto    
  opts)  rebase?
  repo : repository?
  branch : annotated_commit?
  upstream : annotated_commit?
  onto : annotated_commit?
  opts : git_rebase_opts?
Initializes a rebase operation to rebase the changes in branch relative to upstream onto another branch. To begin the rebase process, call git_rebase_next. When you have finished with this object, call git_rebase_free.

procedure

(git_rebase_init_options opts version)  integer?

  opts : git_rebase_opts?
  version : integer?
Initializes a git_rebase_options with default values. Equivalent to creating an instance with GIT_REBASE_OPTIONS_INIT.

procedure

(git_rebase_inmemory_index rebase)  index?

  rebase : rebase?
Gets the index produced by the last operation, which is the result of git_rebase_next and which will be committed by the next invocation of git_rebase_commit. This is useful for resolving conflicts in an in-memory rebase before committing them. You must call git_index_free when you are finished with this.

This is only applicable for in-memory rebases; for rebases within a working directory, the changes were applied to the repository’s index.

procedure

(git_rebase_next rebase)  rebase_operation?

  rebase : rebase?
Performs the next rebase operation and returns the information about it. If the operation is one that applies a patch (which is any operation except GIT_REBASE_OPERATION_EXEC) then the patch will be applied and the index and working directory will be updated with the changes. If there are conflicts, you will need to address those before committing the changes.

procedure

(git_rebase_open repo opts)  rebase?

  repo : repository?
  opts : git_rebase_opts?
Opens an existing rebase that was previously started by either an invocation of git_rebase_init or by another client.

procedure

(git_rebase_operation_byindex rebase idx)  rebase_operation?

  rebase : rebase?
  idx : integer?
Gets the rebase operation specified by the given index.

procedure

(git_rebase_operation_current rebase)  integer?

  rebase : rebase?
Gets the index of the rebase operation that is currently being applied. If the first operation has not yet been applied (because you have called init but not yet next) then this returns GIT_REBASE_NO_OPERATION.

procedure

(git_rebase_operation_entrycount rebase)  integer?

  rebase : rebase?
Gets the count of rebase operations that are to be applied.