Reputation: 1
im so beginner in git and gihub and just need to start Using it to Save my Work , so i start with :
git status
git checkout -b feature/starter-code
git add -A
git commit -m "add starter code"
so till now all is working fine till i start to
git pull origin main
then it shows me this ; fatal: 'url/to/your/fork' does not appear to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
after git origin main i suppose to
git push origin feature/starter-code
please help
i tried too many commands but couldn't push feature/starter-code yo github
Upvotes: 0
Views: 153
Reputation: 558
Do you have the right remote set?
In your .git
directory you can find the file config
which should have something similar to
[remote "origin"]
url = [email protected]:GITHUB_USERNAME/YOUR_REPO.git
fetch = +refs/heads/*:refs/remotes/origin/*
If that is not present you need to run something like
git remote add origin [email protected]:GITHUB_USERNAME/YOUR_REPO.git
To add the origin remote.
After that you should be able to git push / pull.
Upvotes: 2