No example I have found shows how to do the simplest of tasks in git.
Could someone show me the git command needed to do the same as this this SVN job?
svn checkout svn://jeeves/testrepo
cd testrepo
echo >newfile.txt Wow I added a file
svn add newfile.txt
svn commit -m "How simple was that"
Assume I'm sitting on the machine with the git repository. Here's what I'm doing (along with hundreds of variations, it seems).
git clone ~/git/testrepo.git
cd testrepo
echo >newfile.txt Wow I added a file
git add newfile.txt
git commit -m "So far, so good. Everything has worked so far..."
git push origin master
I can't believe this is so difficult. I'm obviously missing something, because I keep getting messages like
jeeves:~/git/myCare geoffrey$ git push origin master
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
Help!