[Top][All Lists]

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

Re: VC mode and git

From: Paul Eggert
Subject: Re: VC mode and git
Date: Wed, 25 Mar 2015 11:20:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/25/2015 07:43 AM, Richard Stallman wrote:
something is wrong in my repository with
lisp/ChangeLog.  I have changes I want to check in, and I don't know
what to do.  Brief hints are not enough to enable me to fix this.
How should I get my changes installed?

Would you please help me?

Here's a method that should work. It's slow and painstaking but each step should be easy to follow, which is the main thing.

* Decide the changes that you want and record them, e.g., by putting them into a file 'wanted.diff':

  git diff >wanted.diff

* Apparently your copy of the master branch is busted, so rename it to something else so that it's out of the way:

  git branch -m master master-busted

* Create a new branch 'master' that tracks the origin:

  git branch --track master origin/master

* Check it out, discarding all your local changes (be careful here! the local changes should all be in 'wanted.diff'):

  git checkout -f master

* Make sure the master is up-to-date:

  git pull

* Apply the changes that you want to your working files, e.g.:

  patch -p1 <wanted.diff
  [Fix any problems by hand.]

* Use 'git diff' to make sure the patch is what you want. If not, fix problems by hand and run 'git diff again.

* Commit the result:

  git commit -a -m'Fix lisp/ChangeLog'

* Double-check that the commit (including its log message) is really what you want, by inspecting the output of:

  git format-patch --stdout -1

* Push the patch, so that others can see it:

  git push

reply via email to

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