[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "git pull -r" to avoid merge commits
From: |
David Kastrup |
Subject: |
Re: "git pull -r" to avoid merge commits |
Date: |
Sat, 31 May 2014 15:54:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Thien-Thi Nguyen <address@hidden> writes:
> In the ELPA repo, i see "Merge branch 'master' of git+ssh://...",
> which are merge commits IIUC. I suspect this event confused the
> admin scripts and so prevented the (recently released) xpm 1.0.2
> From auto-generating a post to info-gnu-emacs. Is that correct?
>
> On the contributor side, i regularly use "git pull -r" because i
> believe doing so avoids creating merge commits. (This is based
> on git-push(1) section "NOTE ABOUT FAST-FORWARDS", primarily.)
> Am i missing something? Is there a better way to avoid merge
> commits? Is there a better way to ensure announcement trigger?
man git-config contains all of those:
branch.autosetuprebase
When a new branch is created with git branch or git checkout
that tracks another branch, this variable tells Git to set up
pull to rebase instead of merge (see
"branch.<name>.rebase"). When never, rebase is never
automatically set to true. When local, rebase is set to true
for tracked branches of other local branches. When remote,
rebase is set to true for tracked branches of remote-tracking
branches. When always, rebase will be set to true for all
tracking branches. See "branch.autosetupmerge" for details on
how to set up a branch to track another branch. This option
defaults to never.
branch.<name>.rebase
When true, rebase the branch <name> on top of the fetched
branch, instead of merging the default branch from the
default remote when "git pull" is run. See "pull.rebase" for
doing this in a non branch-specific manner.
When preserve, also pass `--preserve-merges` along to
'git rebase' so that locally committed merge commits will
not be flattened by running 'git pull'.
pull.rebase
When true, rebase branches on top of the fetched branch,
instead of merging the default branch from the default remote
when "git pull" is run. See "branch.<name>.rebase" for
setting this on a per-branch basis.
When preserve, also pass `--preserve-merges` along to
'git rebase' so that locally committed merge commits will
not be flattened by running 'git pull'.
--
David Kastrup