git workflow for D

Patrick Schluter Patrick.Schluter at bbox.fr
Mon Dec 4 17:38:19 UTC 2017


On Monday, 4 December 2017 at 11:51:42 UTC, Nick Sabalausky 
(Abscissa) wrote:
> On 12/03/2017 03:05 PM, bitwise wrote:
>
> One thing to keep in mind: Any time you're talking about moving 
> anything from one repo to another, there's exactly two basic 
> primitives there: push and pull. Both of them are basically the 
> same simple thing: All they're about is copying the latest new 
> commits (or tags) from WW branch on XX repo, to YY branch on ZZ 
> repo. All other git commands that move anything bewteen repos 
> start out with this basic "push" or "pull" primitive. (Engh, 
> technically "fetch" is even more of a primitive than those, but 
> I find it more helpful to think in terms of "push/pull" for the 
> most typical daily tasks.)
No, the pair us push/fetch. pull is fetch+merge and a lot of 
confusion comes from that in fact. I've seen several people 
cursing git because of that idea that pull is the opposite of 
push. When I explained that they should never use git pull, but 
always separating fetch from the merge, it clicked every time.
So, avoid pull, look first what fetch does and if that is what 
you thought it would do, do the merge and be happy.



More information about the Digitalmars-d-learn mailing list