[Top][All Lists]

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

Re: VC mode and git

From: Harald Hanche-Olsen
Subject: Re: VC mode and git
Date: Sun, 05 Apr 2015 15:32:57 +0200
User-agent: Postbox 3.0.11 (Macintosh/20140602)

Harald Hanche-Olsen wrote:
Eli Zaretskii wrote:
It also requires to use at least one more command ("git merge"),

Yup. However, you will not encounter any difficulties arising from this
that you do't already encounter with “git pull”.

To be specific, this is the workflow I had in mind:

git checkout master # in case you're not already there
git pull # to stay reasonably current
git checkout -b hack master

You are now on a branch called “hack”, which is a copy of the master branch. Hack away, commit as you see fit, and when all satisfied, push it all by doing this:

(If at this point you have uncommitted changes that you do not wish to checkin yet, run “git stash” to put them aside.)

git checkout master
git pull
git merge hack
git push

– possibly pausing to fix any merge conflicts along the way.

Once the merge and push have succeeded, you can delete the hack branch:

git branch -d hack

And if you had stashed some uncommited changes earlier, start over:

git checkout -b hack master
git stash pop
# fix merge conflicts, if any, then continue hacking

– Harald

reply via email to

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