From 3c6e00d2178000234dfaf4da15ed1804d447c763 Mon Sep 17 00:00:00 2001 From: Asocia Date: Wed, 7 Jul 2021 14:50:23 +0300 Subject: [PATCH] Update til --- git/adding-remote-to-existing-repository.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/git/adding-remote-to-existing-repository.md b/git/adding-remote-to-existing-repository.md index 638f607..023cd3e 100644 --- a/git/adding-remote-to-existing-repository.md +++ b/git/adding-remote-to-existing-repository.md @@ -5,5 +5,15 @@ git remote add Example: ``` git remote add origin git@github.com:Asocia/til.git -git push -u origin master +git push -u origin my_branch ``` + +If you get an error like +``` +error: remote origin already exists. +``` + +you can: + + - remove the origin and try again. `git remote remove origin` + - add it with a different name. `git remote add ... ...`