From dce7c2175d9d45041bb818a84c7899849153c9d2 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Sun, 2 May 2021 18:49:01 +0200 Subject: [PATCH] Auto: misc. --- journal/2021-05-02.md | 4 +++- push-an-existing-repository-to-a-new-remote.md | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 push-an-existing-repository-to-a-new-remote.md diff --git a/journal/2021-05-02.md b/journal/2021-05-02.md index d73feebd4..d835625d0 100644 --- a/journal/2021-05-02.md +++ b/journal/2021-05-02.md @@ -3,4 +3,6 @@ - [[pull]] [[weekend 17]] - [[snapshot]] - [[how many tabs do you have open?]] -- [[flancian feedback]] \ No newline at end of file +- [[flancian feedback]] +- [[git]] + - [[push an existing repository to a new remote]] \ No newline at end of file diff --git a/push-an-existing-repository-to-a-new-remote.md b/push-an-existing-repository-to-a-new-remote.md new file mode 100644 index 000000000..14d9e45f5 --- /dev/null +++ b/push-an-existing-repository-to-a-new-remote.md @@ -0,0 +1,10 @@ +# push an existing repository to a new remote + +- first [[commit]] +- then: + +``` +git remote add origin git@example.org:username/repo.git +git branch -M main +git push -u origin main +```