# Question about migrating a repository

3 messages from 2024-02-16 to 2024-02-17. Participants: Gabor Urban, Kristoffer Haugsbakk, Chris Torek.
Thread: https://gitlist.dev/t/60938

## Gabor Urban, 2024-02-16 19:34

Subject: Question about migrating a repository
Message-ID: <CAL=1hhwreG_W_Ch-B5DXioqjUsfkgjayNZbkCk7uOv3vc=TBSQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAL%3D1hhwreG_W_Ch-B5DXioqjUsfkgjayNZbkCk7uOv3vc%3DTBSQ%40mail.gmail.com

```
Hi guys,

I need a bit help.

I have migrated my git repository from my old computer using a bundle.
(The repo was local with no clones.) That computer will be dismantled
and thrown away.

I checked and verything is working fine till I get a git status
report. The most relevant part is:

On branch master
Your branch is up to date with 'origin/master'.

I would like to make THIS repository to be the "origin". (The other
will be destroyed.) How could I do that?

Thanks for any help in advance,


-- 
Urbán Gábor

Linux is like a wigwam: no Gates, no Windows and an Apache inside.

```

## Kristoffer Haugsbakk, 2024-02-16 19:46

Subject: Re: Question about migrating a repository
Message-ID: <6965c59e-8edd-4d91-81da-3600a61569a3@app.fastmail.com>
URL: https://gitlist.dev/e/6965c59e-8edd-4d91-81da-3600a61569a3%40app.fastmail.com
In-Reply-To: <CAL=1hhwreG_W_Ch-B5DXioqjUsfkgjayNZbkCk7uOv3vc=TBSQ@mail.gmail.com>

```
On Fri, Feb 16, 2024, at 20:34, Gabor Urban wrote:
> Hi guys,
>
> I need a bit help.
>
> I have migrated my git repository from my old computer using a bundle.
> (The repo was local with no clones.) That computer will be dismantled
> and thrown away.
>
> I checked and verything is working fine till I get a git status
> report. The most relevant part is:
>
> On branch master
> Your branch is up to date with 'origin/master'.
>
> I would like to make THIS repository to be the "origin". (The other
> will be destroyed.) How could I do that?
>
> Thanks for any help in advance,

`origin/master` is a “remote-tracking branch”. It points to `master` on
the `origin` remote. Or to be precise: it points to a ref that you use
to track this branch from that remote. A remote is some other repository
that you have a link to, like a URL.

That ref (reference) was updated with a command like `git fetch`.

You can get the link to that remote with

ˋˋˋ
git remote get-url origin
ˋˋˋ

Your own local repository is never a remote like `origin`. You don’t
have to make your own repository into a remote.

Your repository is fine. There’s nothing that you need to do.

>
>
> --
> Urbán Gábor
>
> Linux is like a wigwam: no Gates, no Windows and an Apache inside.

-- 
Kristoffer Haugsbakk

```

## Chris Torek, 2024-02-17 01:22

Subject: Re: Question about migrating a repository
Message-ID: <CAPx1GvfVNOeMSJMFgJfGUA9MNBAyuvpwpKfX0ZH0JTJPwuxYnA@mail.gmail.com>
URL: https://gitlist.dev/e/CAPx1GvfVNOeMSJMFgJfGUA9MNBAyuvpwpKfX0ZH0JTJPwuxYnA%40mail.gmail.com
In-Reply-To: <6965c59e-8edd-4d91-81da-3600a61569a3@app.fastmail.com>

```
On Fri, Feb 16, 2024 at 11:47 AM Kristoffer Haugsbakk
<code@khaugsbakk.name> wrote:
> Your repository is fine. There’s nothing that you need to do.

This is correct, but, if you'd like to make your local Git stop
mentioning `origin`
entirely, you can simply run:

    git remote remove origin

which will cause your (new) local Git repository to forget that it got
copied from
somewhere else.

You can shorten the word `remove` to just `rm` (as in the Linux/Unix
"remove file" command).

Chris

```
