emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VC mode and git


From: Eli Zaretskii
Subject: Re: VC mode and git
Date: Wed, 01 Apr 2015 17:43:18 +0300

> Date: Wed, 01 Apr 2015 06:22:15 -0400
> From: Richard Stallman <address@hidden>
> Cc: address@hidden
> 
>  > > Reportedly pull includes merge, so this implies that git pull is also
>   > > dangerous when you have made changes.
> 
>   > Dangerous in which way?
> 
> I don't know.  The git documentation says it can cause some sort of
> lossage, but was not specific.

I suggest that you disregard that hypothetical lossage.

>   > If you get a conflict in the merge, git will not complete the commit
>   > until the conflict is handled (much as any version control system).
> 
> 1. Is that what happened to me?  I've sent the output of several
> diagnostic commands; perhaps you can tell from them.

That was my conclusion, yes.

> 2. With CVS, merge conflicts are easy to handle -- just edit the file,
> look for the <<< and >>> that indicate conflicts, and fix up each one.
> Can I do it that way in Git?

Yes, you can.  The files with conflicts has the same merge-conflict
markers that you are used to.  When you edit a file with
merge-conflict markers, the development version (Emacs 25.0.50) should
automatically enter the smerge-mode, which is a minor mode with
support for that (see its documentation for a few useful commands).
Furthermore, for each file you save after fixing all the conflicts, VC
should automatically invoke Git with the "git add" command, so that
the de-conflicted file being saved is ready to be committed.

Once you fix all the conflicts, invoke "git commit" to complete the
merge (which "git pull" normally does automatically, but didn't do due
to the conflicts).  After that, you should "git push" to update the
repository on Savannah with your local commits.

I think this is very similar to what you used to do with CVS and bzr,
the only difference is that a singe commit command after fixing the
conflicts is replaced with 2 separate commands: first commit locally,
then push upstream.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]