On the first machine, you created a non-bare repository, or a repository that has a working copy. Pushing to a non-bare repo can get a little exciting, so make sure that’s actually what you want.
On the second machine, you created a new repository in the current directory (git init), then cloned gitrepo into a sub-directory as a second repo. Again, that’s fine, just make sure it’s what you wanted.
Here’s how it would work with a bare repo on the first machine and one repo on the second:
git init --bare gitrepo.git
git clone user@server:~/gitrepo.git
git add test
git commit -a
# '-u' tells git to track the remote master branch with your local master branch
git push -u origin master