Skip to content

Instantly share code, notes, and snippets.

@shredder47
Last active January 6, 2021 18:04
Show Gist options
  • Save shredder47/d153e7fb4cb5506b7e1c1a3570ee8f29 to your computer and use it in GitHub Desktop.
Save shredder47/d153e7fb4cb5506b7e1c1a3570ee8f29 to your computer and use it in GitHub Desktop.
Git Origin Remove and Add New
git init
git add .
git commit -m "question1 added"
git branch -M main
git remote add origin remote_url
git push -u origin main
//For removing exising origin and adding new
git remote show origin
git remote rm origin
git add .
git commit -m "INIT"
git remote add origin remote_url
git remote show origin
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment