Last active
August 7, 2024 01:22
-
-
Save BruceMcKinnon/5c7dfccaa2c477e183007ff2e4e8cdf0 to your computer and use it in GitHub Desktop.
Bitbucket or GitHub remote connect local repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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