addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

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

From: user 9.
Sent on: Thursday, September 23, 2010 4:23 PM
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]

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

  • OpenShift

    Red Hat provides refreshments for the SF MUG

  • MongoLab

    MongoLab provides refreshments and document oriented notebooks

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