Trebejo.Git.Local.Merge (Trebejo v2.0.0)

Copy Markdown View Source

Git merge conflict operations — conflict detection, merge abort, marking files as resolved, and related merge/revert/squash operations.

Summary

Functions

Cherry-picks a commit.

Commits all staged changes.

Lists files with merge conflicts in the repo.

Marks a conflicted file as resolved (after manual fix).

Merges a branch into the current branch.

Aborts a merge in progress.

Merges a commit into the current branch.

Rebase a branch onto another.

Reverts a commit.

Squashes commits into one.

Stages all changes.

Functions

cherry_pick(repo_path, commit_hash)

@spec cherry_pick(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Cherry-picks a commit.

commit_all(repo_path, message)

@spec commit_all(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Commits all staged changes.

conflict_files(repo_path \\ ".")

@spec conflict_files(binary()) :: {:ok, [binary()]} | {:error, binary()}

Lists files with merge conflicts in the repo.

mark_resolved(repo_path, file)

@spec mark_resolved(binary(), binary()) :: :ok | {:error, binary()}

Marks a conflicted file as resolved (after manual fix).

merge(repo_path, branch)

@spec merge(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Merges a branch into the current branch.

merge_abort(repo_path \\ ".")

@spec merge_abort(binary()) :: {:ok, binary()} | {:error, binary()}

Aborts a merge in progress.

merge_commit(repo_path, commit_hash)

@spec merge_commit(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Merges a commit into the current branch.

rebase(repo_path, branch)

@spec rebase(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Rebase a branch onto another.

revert(repo_path, commit_hash)

@spec revert(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Reverts a commit.

squash(repo_path, commit_hash)

@spec squash(binary(), binary()) :: {:ok, binary()} | {:error, any()}

Squashes commits into one.

stage_all(repo_path)

@spec stage_all(binary()) :: {:ok, binary()} | {:error, any()}

Stages all changes.