git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Overwrite master

From
PHPeter Harris <git@peter.is-a-geek.org>
Date
Dec 2, 2008, 16:32 UTC
Message-ID
<eaa105840812020832p395ecefdq57e62f95182a3557@mail.gmail.com>
In-Reply-To
<D1AC0A41-E89A-4B53-A449-DA9C4422998E@zooppa.com>
On Tue, Dec 2, 2008 at 11:10 AM, Nicholas Wieland wrote:
> Hi *,
> I need to overwrite my master branch with another branch. I've already
> created a backup branch of my master.

While on master, "git reset --hard <newbranch>"

Or while on a different branch, git branch -D master git branch master <newbranch>

Peter Harris
Previous: Nicholas WielandNext: Nicholas Wieland
Message 2 of 4 in “Overwrite master”
  1. Nicholas WielandDec 2, 2008
  2. Peter HarrisDec 2, 2008
  3. Nicholas WielandDec 2, 2008
  4. Peter HarrisDec 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.