addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [San-Francisco-MongoDB-User-Group] git question

From: Elliott B.
Sent on: Friday, September 24, 2010 7:29 AM
Thanks, Pete.  I shall experiment.



From: Pete Hodgson <[address removed]>
To: [address removed]
Sent: Thu, September 23,[masked]:24:31 PM
Subject: Re: [San-Francisco-MongoDB-User-Group] git question

Ack, I meant git reset, not git rebase:

git checkout master
git reset --hard A

On Thu, Sep 23, 2010 at 4:23 PM, Pete Hodgson <[address removed]> wrote:
AFAIK master isn't special, it's just a branch like any other. So there should be no issue in you re-pointing it to the head of A. I think you should be able to just do the following (untested):

git checkout master
git rebase --hard A

and then master will point to the same commit as the head of A. You can also do this using a gui with gitk. Checkout master, launch gitk, right-click on the commit that A points to, and choose 'reset master branch to here'.

Cheers,
Pete


On Wed, Sep 22, 2010 at 9:31 AM, elmo <[address removed]> wrote:
Hi,

Here's a git question for ya'll.

I've got a repo that manages a bunch of branches.  For the sake of clarity, let's say my repo has these branches:

master
A
B

The 'master' branch has be neglected for so long, that its  no longer relevant.  What I'd like to do is essentially copy 'A' to master.  I don't want to merge, I want to replace.

In unix terms, I'd like to:

cp -R A master

 For all intents and purposes, A is the new master.

One though I had would be to

1. delete the 'master' branch (git branch -D master)
2. recreate it by branching from A.  ( git branch A)

Is there any harm in me doing this?  Is there anything  special about 'master' that would prevent me from deleting it?  Or is 'master' just a branch like all others?

Thoughts?


Elliott





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by elmo ([address removed]) from San Francisco MongoDB User Group.
To learn more about elmo, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]






--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Pete Hodgson ([address removed]) from San Francisco MongoDB User Group.
To learn more about Pete Hodgson, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

  • MongoDB

    MongoDB organizes the San Francisco MongoDB User Group

  • Rainforest QA

    We will personally help you deploy a bug-free app with Rainforest QA!

  • O'Reilly

    O'Reilly donates technology books to members of the MongoDB User Group

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy