I want to create a git repository on my USB stick. On the stick I created a bare git repository by using the command
git init --bare MyRepo
and in the repository on the laptop (Ubuntu 14.04) I issued the following commands
git init
git add .
git commit -m 'first commit'
git remote add origin /media/alexander/Stick/MyRepo
and got the error
fatal: remote origin already exists.
I successfully created a git repo on the stick just before without any error (using different directories of course). Now I get this error. The output of 'git status' is
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
So what is going wrong?