Sorry, I'm a git newbie (though I'm very familiar with older source control systems like cvs and svn) ...
My ultimate goal is to add a file to a remote repository (one not on my machine) by cloning that remote repository locally, adding the file to the local repository, committing my change, and then pushing my local repository back to the remote.
I tried this:
git clone ssh://user@server/Users/GitRepo/Project.git
<create file locally>
git add <localfile>
git commit -m "Narg"
git push
But it just says "Everything up to date".
So I tried going step-by-step, and got even more confused.
git clone ssh://user@server/Users/GitRepo/Project.git
git status
And it tells me
# Not currently on any branch
# Untracked files:
followed by a long list of Untracked files.
Which seems really strange, why would the files be untracked if I just cloned the repository?
If it's important, the remote repository is brand-new, created via svn2git.
If I type
git remote show origin
it tells me
* remote origin
Fetch URL: ssh://user@server/Users/GitRepo/Project.git
Push URL: ssh://user@server/Users/GitRepo/Project.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushed to master (up to date)
and if I type
git branch -a
it tells me
* (no branch)
master
remotes/GitRepo/master
remotes/origin/HEAD -> origin/master
remotes/origin/master
So am I just confused, and everything is actually working correctly? Or am I doing the git commands wrong? Or did I create the repository incorrectly, so no git commands will ever work properly?
Thanks, Chris