On this page
fetch from a remote and merge what was fetched, with the merge strategy stated explicitly: --merge-strategy is required and has no default, so a pull never depends on git's own configuration to decide whether it may create a merge commit.
#safegit pull
fetch from a remote and merge what was fetched, with the merge strategy stated explicitly: --merge-strategy is required and has no default, so a pull never depends on git's own configuration to decide whether it may create a merge commit. The merge step is safegit's own -- the same one 'safegit merge' performs -- so a pull that cannot fast-forward produces a commit carrying safegit's trailers, run through the repository's commit-msg hook and reversible with 'safegit undo'; a pull that can fast-forward moves the ref under compare-and-swap and puts the index and the working tree in step with it. A merge git stops on a conflict parks, and 'safegit merge-continue' concludes it. --rebase is refused and names the two commands that do it
Effect: mutating
#Flags
| Name | Short | Type | Presence | Env | Description |
|---|---|---|---|---|---|
--merge-strategy | str | required | how the fetched commits are merged into the current branch Values: ff (fast-forward when possible, otherwise create a merge commit), ff-only (fast-forward only, refusing the pull when the branches have diverged), no-ff (always create a merge commit, even when a fast-forward is possible). | ||
--rebase | bool | optional | REFUSED, and declared so the refusal can say what to do instead: rebasing after a fetch is 'git fetch' followed by 'safegit rebase |
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
remote | str | optional | name of the remote repository to pull from (defaults to origin) |
branch | str | optional | name of the remote branch to fetch and merge into the current branch |
#Grants
| Kind | Name | Reason |
|---|---|---|
| proc_mutate | parent-bump | pulling in a submodule moves the parent's gitlink, so safegit commits the parent too when commit.autoBumpParent is on |