unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: "git pull -r" to avoid merge commits
Date: Sat, 31 May 2014 15:54:43 +0200	[thread overview]
Message-ID: <87zjhycau4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87a99yqe0d.fsf@zigzag.favinet

Thien-Thi Nguyen <ttn@gnu.org> 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




  parent reply	other threads:[~2014-05-31 13:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-31 13:22 "git pull -r" to avoid merge commits Thien-Thi Nguyen
2014-05-31 13:42 ` Eli Zaretskii
2014-06-01  4:14   ` Eric Hanchrow
2014-06-01  5:04     ` David Kastrup
2014-06-01  5:57     ` Thien-Thi Nguyen
2014-05-31 13:54 ` David Kastrup [this message]
2014-05-31 14:29 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zjhycau4.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).