public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Question about migrating a repository
@ 2024-02-16 19:34 Gabor Urban
  2024-02-16 19:46 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 3+ messages in thread
From: Gabor Urban @ 2024-02-16 19:34 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about migrating a repository
  2024-02-16 19:34 Question about migrating a repository Gabor Urban
@ 2024-02-16 19:46 ` Kristoffer Haugsbakk
  2024-02-17  1:22   ` Chris Torek
  0 siblings, 1 reply; 3+ messages in thread
From: Kristoffer Haugsbakk @ 2024-02-16 19:46 UTC (permalink / raw)
  To: Gabor Urban; +Cc: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question about migrating a repository
  2024-02-16 19:46 ` Kristoffer Haugsbakk
@ 2024-02-17  1:22   ` Chris Torek
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Torek @ 2024-02-17  1:22 UTC (permalink / raw)
  To: Kristoffer Haugsbakk; +Cc: Gabor Urban, git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-17  1:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 19:34 Question about migrating a repository Gabor Urban
2024-02-16 19:46 ` Kristoffer Haugsbakk
2024-02-17  1:22   ` Chris Torek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox