…or create a new repository on the command line
echo “# icd0008-2020f-05” >> README.md
git init
git add README.md
git commit -m “first commit”
git branch -M main
git remote add origin https://github.com/robineero/icd0008-2020f-05.git
git push -u origin main
…or push an existing repository from the command line
git remote add origin https://github.com/robineero/icd0008-2020f-05.git
git branch -M main
git push -u origin main
“Remote origin already exists” error (viide): git remote set-url origin https://github.com/your/repository
Which git is: git remote -v
Git not working
https://stackoverflow.com/questions/25436312/gitignore-not-working/25436481
The files/folder in your version control will not just delete themselves just because you added them to the .gitignore
. They are already in the repository and you have to remove them. You can just do that with this:
(Remember to commit everything you’ve changed before you do this.)
git rm -rf --cached .
git add .
This removes all files from the repository and adds them back (this time respecting the rules in your .gitignore
).