all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kelvin White <kwhite@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Alan Mackenzie <acm@muc.de>, emacs-devel@gnu.org
Subject: Re: After a git merge and manual correction of a conflict, how do I tell git the conflict is fixed?
Date: Wed, 27 May 2015 03:16:39 +0000	[thread overview]
Message-ID: <CAG-q9=bJaBNS-nBGH2RSf-Pzb4dnFn7QkJHg1eNMCh-ZtcdZEQ@mail.gmail.com> (raw)
In-Reply-To: <CAG-q9=aysW1gVg3FqFct9QFsX4iocNdjrOjudzDzzhKaekXEqw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2722 bytes --]

On Tue, May 26, 2015 at 11:14 PM Kelvin White <kwhite@gnu.org> wrote:

> On Tue, May 26, 2015 at 10:55 PM Kelvin White <kwhite@gnu.org> wrote:
>
>> On Tue, May 26, 2015 at 10:40 PM Stefan Monnier <monnier@iro.umontreal.ca>
>> wrote:
>>
>>> >  Which will have the exact same effects as `git rm --cached <file>' no?
>>>
>>> Not at all.  "git rm ..." will remove the file from the repository,
>>> i.e. it will have an effect for *everyone else*.
>>>
>>>
>>>         Stefan
>>>
>>>
>> Forgive me, but I think the confusion here is due to the fact that `git
>> reset <file>' will remove it from the curennt index, while `git rm --cache
>> <file>' will remove it from the repository completely, while leaving the
>> current local copy in tact.
>>
>
> In this case, this is exactly what you would want. Why would you want to
> keep this file in version control for everyone else? Consider this...
>
> l3thal@dev ~/src/emacs-dev $ git checkout -b test
> Switched to a new branch 'test'
> l3thal@dev ~/src/emacs-dev $ echo "moo" >> test_file
> l3thal@dev ~/src/emacs-dev $ git status
> # On branch test
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> # test_file
> nothing added to commit but untracked files present (use "git add" to
> track)
> l3thal@dev ~/src/emacs-dev $ git add test_file
> l3thal@dev ~/src/emacs-dev $ git status
> # On branch test
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> # new file:   test_file
> #
> l3thal@dev ~/src/emacs-dev $ git commit -m "adding test file"
> [test dde69ae] adding test file
>  1 file changed, 2 insertions(+)
>  create mode 100644 test_file
> l3thal@dev ~/src/emacs-dev $ git status
> # On branch test
> nothing to commit, working directory clean
> l3thal@dev ~/src/emacs-dev $ git rm --cached test_file
> rm 'test_file'
> l3thal@dev ~/src/emacs-dev $ git status
> # On branch test
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> # deleted:    test_file
> #
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> # test_file
> l3thal@dev ~/src/emacs-dev $ git commit -am "removing test file"
> [test 46f7f53] removing test file
>  1 file changed, 2 deletions(-)
>  delete mode 100644 test_file
> l3thal@dev ~/src/emacs-dev $ git status
> # On branch test
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> # test_file
> nothing added to commit but untracked files present (use "git add" to
> track)
>

This is the same situation as a merge conflict in a file that you dont want
to keep in the remote git repo.. You need to remove it from the index and
keep it locally.

[-- Attachment #2: Type: text/html, Size: 4556 bytes --]

  reply	other threads:[~2015-05-27  3:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 22:39 After a git merge and manual correction of a conflict, how do I tell git the conflict is fixed? Alan Mackenzie
2015-05-26 22:43 ` Dmitry Gutov
2015-05-26 22:48   ` Kelvin White
2015-05-26 22:56     ` Alan Mackenzie
2015-05-26 23:05       ` Dmitry Gutov
2015-05-26 23:11         ` Kelvin White
2015-05-26 23:14           ` Kelvin White
     [not found]             ` <CAG-q9=aSF+6AcR1SHRgCTQLUrKXB5OEzPcbuV8M5+VEacxZc0g@mail.gmail.com>
2015-05-26 23:19               ` Kelvin White
2015-05-27  0:18       ` Tom Jakubowski
2015-05-27  2:38       ` Eli Zaretskii
2015-05-27  8:17       ` Andreas Schwab
2015-05-27 19:53       ` Steinar Bang
2015-05-28  5:27         ` Yuri Khan
2015-05-26 22:44 ` Kelvin White
2015-05-26 23:31 ` Artur Malabarba
2015-05-27  0:21   ` Kelvin White
2015-05-27  0:29     ` Dmitry Gutov
2015-05-27  0:36       ` Kelvin White
2015-05-27  0:38         ` Dmitry Gutov
2015-05-27  0:45           ` Kelvin White
2015-05-27  0:56             ` Dmitry Gutov
2015-05-27  1:55               ` Kelvin White
2015-05-27  1:57                 ` Kelvin White
2015-05-27  2:02                   ` Dmitry Gutov
2015-05-27  2:23                     ` Kelvin White
2015-05-27  0:56 ` Kelvin White
2015-05-27  1:02 ` Dmitry Gutov
2015-05-27  1:40 ` Stefan Monnier
2015-05-27  1:52   ` Kelvin White
2015-05-27  2:40     ` Stefan Monnier
2015-05-27  2:55       ` Kelvin White
2015-05-27  3:14         ` Kelvin White
2015-05-27  3:16           ` Kelvin White [this message]
2015-05-27 10:12           ` Dmitry Gutov
2015-05-27 11:26             ` Kelvin White
2015-05-27 11:34               ` Dmitry Gutov
2015-05-27 12:36                 ` Kelvin White
2015-05-27 12:48                   ` Dmitry Gutov
2015-05-28  6:30         ` Steinar Bang
2015-05-27  2:37 ` Eli Zaretskii
2015-05-27 15:47   ` Alan Mackenzie
2015-05-27 19:46 ` Steinar Bang

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

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

  git send-email \
    --in-reply-to='CAG-q9=bJaBNS-nBGH2RSf-Pzb4dnFn7QkJHg1eNMCh-ZtcdZEQ@mail.gmail.com' \
    --to=kwhite@gnu.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.