Re: Rationale for the "Never commit to the right side of a Pull line" rule

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

 



Jerome Lovy wrote:

> Could someone please point me to / give me the rationale for the "Never 
> commit to the right side of a Pull line" rule ?
> 
> I found the rule in the second Note of the git-fetch man-page (eg 
> http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html).

Because git refuses to fetch into branch on top of which there are changes
which are not present in the branch you fetch from (if it is not
fast-forward case). So commitiing to tracking branches breaks the most
typical workflow, i.e. fetch when you want, push when you are ready.

git-clone --use-separate-remotes takes care of that by putting tracking
branches in refs/remotes/, i.e. outside refs/heads/, so you cannot commit
there, at least not by accident.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
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]