Skip to content

Instantly share code, notes, and snippets.

@BruceMcKinnon
Last active August 7, 2024 01:22
Show Gist options
  • Save BruceMcKinnon/5c7dfccaa2c477e183007ff2e4e8cdf0 to your computer and use it in GitHub Desktop.
Save BruceMcKinnon/5c7dfccaa2c477e183007ff2e4e8cdf0 to your computer and use it in GitHub Desktop.
Bitbucket or GitHub remote connect local repo
git init
git add .
git commit -m "Initial Commit"
// You can find the URL next to the git clone command for the repository.
// E.g., {URL} = https://[email protected]/username/repo.git
//
// Refer to: https://community.atlassian.com/t5/Git-questions/fatal-No-such-remote-origin-after-git-remote-set-url-origin/qaq-p/401456
//
git remote add -mirror origin {URL}
OR:
git remote add origin [email protected]:git_user/git_repo.git
git pull origin master --rebase
git push origin master
OR:
git pull origin main --rebase
git push origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment