Re: simple git use case

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

 



On 2009-02-05, Jay Soffian <jaysoffian@xxxxxxxxx> wrote:
> On Wed, Feb 4, 2009 at 11:52 PM, Erik Iverson
> <iverson@xxxxxxxxxxxxxxxx> wrote:
>> and a laptop.  When I go on the trips, I'd love to be able to bring my
>> "git-test" directory with me on the laptop, code some, and then get the new
>> revisions back on the desktop when I get home (bonus if I can get the
>> revisions back to my desktop over the internet while still on the road, in
>> case, for example, my laptop gets stolen).  No one else will be working on
>> this stuff, it's strictly for me.

Erik: I have the exact same situation, and I simply use a
bare repository on the same desktop as a go-between.  I
think this is a better way of doing things -- gives you a
lot of flexibility for all sorts of future situations
(someone else joining the project, you having to temporarily
use a *third* machine, etc).

> Now, whenever you do a "push" on the laptop, it is *not* a symmetrical
> operation to fetch/merge. Rather, the push updates master on the
> desktop to match master from the laptop. However, the working copy on
> the desktop is not touched. So when you login to the desktop, you need
> to manually refresh the working copy from what was pushed. You do this
> with "git reset --hard master". But be careful, if you have made
> changes on the desktop and not committed them, these changes will be
> lost when you do the reset.

If you have a couple of minutes you may also want to take a
look at
http://sitaramc.github.com/concepts-and-tips/0-terminology.html#a5
, where I have explained *why* all this is necessary.  It
doesn't (but probably should) talk about how to set up a
bare repo etc...

[Git experts: be kind :-)  The site itself is a work in
progress, as is my knowledge of git.  However, that
particular page was written after that explanation and demo
actually helped someone]

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