[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:11:15 +0200
User-agent: Postbox 3.0.11 (Macintosh/20140602)

Eli Zaretskii wrote:
Date: Sun, 05 Apr 2015 14:43:21 +0200
From: Harald Hanche-Olsen<address@hidden>
Cc: address@hidden, address@hidden

The usual answer to this is to use development branches instead of
workin directly in the master branch. I think it was decided not to
recommend these for simple workflows, but I don't think it is that much
harder, and it is certainly easier than having separate repositories.

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”.

brings additional risks, like if you pull to or push from the wrong

But without extra configuration or explict arguments on the command line, that is not going to happen:

; git checkout -b test
Switched to a new branch 'test'
; git pull
remote: Counting objects: 113, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 63 (delta 57), reused 0 (delta 0)
Unpacking objects: 100% (63/63), done.
From git://git.savannah.gnu.org/emacs
   fdc5219..bf81946  master     -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> test

; git push
fatal: The current branch test has no upstream branch.
To push the current branch and set the remote as upstream, use

    git push --set-upstream origin test


– Harald

reply via email to

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