From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73957 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: git newbie errors Date: Tue, 09 Nov 2010 19:52:52 +0100 Organization: Probably a good idea Message-ID: <87fwvaba7v.fsf@dod.no> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289328805 10161 80.91.229.12 (9 Nov 2010 18:53:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 9 Nov 2010 18:53:25 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22325@lists.math.uh.edu Tue Nov 09 19:53:17 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PFtJg-0000jF-6T for ding-account@gmane.org; Tue, 09 Nov 2010 19:53:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PFtJb-00040p-Ca; Tue, 09 Nov 2010 12:53:07 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PFtJa-00040a-1o for ding@lists.math.uh.edu; Tue, 09 Nov 2010 12:53:06 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PFtJY-0003mL-Uu for ding@lists.math.uh.edu; Tue, 09 Nov 2010 12:53:05 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PFtJY-00043r-00 for ; Tue, 09 Nov 2010 19:53:04 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PFtJX-0000e9-C7 for ding@gnus.org; Tue, 09 Nov 2010 19:53:03 +0100 Original-Received: from cm-84.208.204.33.getinternet.no ([84.208.204.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2010 19:53:03 +0100 Original-Received: from sb by cm-84.208.204.33.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Nov 2010 19:53:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 30 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.204.33.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:45BRPU2d2rUbMFTDC1o2ZJpCBE0= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73957 Archived-At: I learnt something about git today. We've been running it in a CVS like fashion, and that is (apparently) not the way. What we did was to have one branch in the hub index that our group was working on, and then we all each had a local branch tracking it, and we were all working directly on our local tracking branches. When we then did "git pull" we got some odd merges done into our local branches. It was hard to see what had happened and hard to undo. I ended up with a fresh git clone, replace the index in the working directory, and doing a "git reset --hard" today, after a misbegotten clean up attempt. So... what we'll do come tomorrow, is: - each create a local branch tracking the shared branch on origin - branch off from this local tracking branch to do work, and commit all of our work to this branch - when finished working, switch to the local tracking branch - pull ff changes from the shared origin branch - merge in the local work branch into the tracking branch - handle conflicts - push - if the push fails (because someone else have pushed since your pull), reset --hard your tracking branch, do a new ff pull from origin, do a merge from the temp branch and try pushing again (repeat as needed) - when push has completed the work branch can be deleted (git branch -d will only delete remerged branches) This is the recommended CVS-like pattern of git (or so I'm told).