From: Yuri Khan <yuri.v.khan@gmail.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: git commit/push and VC
Date: Thu, 20 Nov 2014 10:29:30 +0700 [thread overview]
Message-ID: <CAP_d_8Xki6yz1KMcPi_+9-Yj-E+4+dnZ5zDEVJsxsmoxUQkwgw@mail.gmail.com> (raw)
In-Reply-To: <871toysqyq.fsf@rosalinde.fritz.box>
On Thu, Nov 20, 2014 at 5:36 AM, Stephen Berman <stephen.berman@gmx.net> wrote:
> GitForEmacsDevs says this:
>
> If you are a committer, you can merge to the upstream master directly.
>
> First, update your repository:
>
> cd $DEVHOME/emacs
> git checkout master
> git pull
> git merge TASKNAME
> git push
>
> Run the tests:
>
> make check
>
> and then commit
>
> git status
> git commit -m "fixes debbugs:12345"
>
> which merges all your new commits to the upstream master.
>
> I don't understand why `git commit' follows `git push' here (or why
> there isn't another `git push' after `git commit').
Indeed, the instruction quoted above is strange.
Strangeness 1: It assumes that your local master branch has not
diverged from remote master, so “git pull” is a fast-forward. (If this
assumption is incorrect, “git pull” will optionally require you to
resolve merge conflicts, and will introduce a superfluous merge
commit.)
There are two cases how your local master can diverge from remote master:
a. You have some local development going on in local master, unrelated
to TASKNAME. (In a feature-branch-oriented workflow, it should not
happen.)
b. Someone has rewritten the remote history. (By the talks about the
receive.denyNonFastForwards setting on the Emacs central repository
earlier on this list, it looks like the maintainers have decided to
disallow such rewriting.)
Strangeness 2: It suggests to push before running tests.
Presumably, tests exist so that you can check that your work has not
broken anything before sharing it with the world. In that case, you
want to run them before pushing.
Strangeness 3: It tells you to commit after you have just merged and pushed.
Assuming “make check” does not have any effect on the tracked files,
there are no changes that could be committed at this point.
The -m "fixes debbugs:12345" is supposed to go into the commit
message, but there won’t be any commit. Presumably, this line should
go into the message of the merge commit made by “git merge TASKNAME”.
If that merge generates conflicts, you can edit the merge commit
message when committing the merge after having resolved the conflicts.
However, if no conflicts arise, “git merge” will commit the merge
automatically.
To add to the merge commit message, you can either run git merge with
the --no-commit flag and commit manually afterwards, or, immediately
after git merge finishes, you can run git commit --amend.
next prev parent reply other threads:[~2014-11-20 3:29 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 23:36 git commit/push and VC Stephen Berman
2014-11-20 2:07 ` Glenn Morris
2014-11-20 12:28 ` Stephen Berman
2014-11-20 3:29 ` Yuri Khan [this message]
2014-11-20 15:45 ` Eli Zaretskii
2014-11-20 18:17 ` Achim Gratz
2014-11-20 20:59 ` Eli Zaretskii
2014-11-21 0:31 ` Stephen J. Turnbull
2014-11-21 9:01 ` Eli Zaretskii
2014-11-22 5:30 ` Stephen J. Turnbull
2014-11-22 5:50 ` Yuri Khan
2014-11-22 7:17 ` Stephen J. Turnbull
2014-11-22 6:50 ` Ivan Shmakov
2014-11-22 7:25 ` Stephen J. Turnbull
2014-11-22 7:42 ` Ivan Shmakov
2014-11-22 8:59 ` Stephen J. Turnbull
2014-11-22 8:36 ` Eli Zaretskii
2014-11-22 8:37 ` Andreas Schwab
2014-11-22 8:50 ` Ivan Shmakov
2014-11-22 8:35 ` Eli Zaretskii
2014-11-22 9:36 ` Stephen J. Turnbull
2014-11-22 10:25 ` Eli Zaretskii
2014-11-22 11:31 ` Andreas Schwab
2014-11-22 12:37 ` Eli Zaretskii
2014-11-22 13:00 ` Andreas Schwab
2014-11-22 13:45 ` Eli Zaretskii
2014-11-22 14:12 ` Andreas Schwab
2014-11-22 15:20 ` Eli Zaretskii
2014-11-21 8:23 ` martin rudalics
2014-11-21 9:06 ` Eli Zaretskii
2014-11-21 9:40 ` Dani Moncayo
2014-11-21 10:24 ` martin rudalics
2014-11-21 10:40 ` Eli Zaretskii
2014-11-21 8:49 ` Thien-Thi Nguyen
2014-11-21 9:12 ` Eli Zaretskii
2014-11-22 10:30 ` Eli Zaretskii
2014-11-22 10:43 ` David Kastrup
2014-11-22 11:01 ` Eli Zaretskii
2014-11-22 11:16 ` Eli Zaretskii
2014-11-22 11:22 ` David Kastrup
2014-11-21 10:34 ` Stephen Berman
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=CAP_d_8Xki6yz1KMcPi_+9-Yj-E+4+dnZ5zDEVJsxsmoxUQkwgw@mail.gmail.com \
--to=yuri.v.khan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=stephen.berman@gmx.net \
/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).