Re: best git practices, was Re: Git User's Survey 2007 unfinished summary continued

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

 



Hi,

On Mon, 22 Oct 2007, Andreas Ericsson wrote:

> If I were to suggest any improvements, it'd be to change the semantics of
> git-pull to always update the local branches set up to be merged with the
> remote tracking branches when they, prior to fetching, pointed to the same
> commit, such that when
> 
> $ git show-ref master
> d4027a816dd0b416dc8c7b37e2c260e6905f11b6 refs/heads/master
> d4027a816dd0b416dc8c7b37e2c260e6905f11b6 refs/remotes/origin/master
> 
> refs/heads/master gets set to refs/remotes/origin/master post-fetch.

In general, this should fail.  Because you are expected to have local 
changes in the local branches.  What you describe suggests that you should 
not use the branch name "master" at all, but "origin/master".

That said, there is a pretty simple way to achieve what you want (even if 
it does not help the confusion you create between local and remote 
branches):

	git config --add remote.origin.fetch master:master

Of course, when you checkout "master" and pull then, you'll get even more 
problems, _exactly_ because you muddled up the clear distinction between 
local and remote branches.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux