To fully remove all GIT association from a folder, run the following command:
rm -rf .git
git remote remove origin
git remote add origin git_url
git remote set-url origin git_url
To fix:
To github.com:git_url
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'github.com:git_url'
git fetch origin
git merge origin/main
Now start to push:
git add .
git commit -m "test"
git push -u origin main
Contents
Do this if someone fixed the conflicts and you had already started but want to download the latest changes.
git merge --abort
git remote add origin git@github.com:elemusma/supabase-tutorial.git
git checkout -b branch_name
Checks current git connection
git branch
git checkout main
git checkout -b new-branch-connection
git branch
git add .
git commit -m "Your commit message"
git push -u origin new-branch-connection
Have any questions or comments? Write them below!