Reputation: 1153
Just starting with Git and I'm finding something strange.
I have a git repo on github - https://github.com/ankh2054/modx.git I have a directory on my sever /home/Modx
I've added the github as a remote Repo, and if I run the command
git remote -v
I get the following output
origin https://github.com/ankh2054/modx.git (fetch)
origin https://github.com/ankh2054/modx.git (push)
But when I run git status, it does not mention anything about my remote Repo. So when I update and commit files locally it does't prompt me about my local being more up to date than my remote Repo.
git status
On branch master
nothing to commit, working directory clean
What I should say I believe is:
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Upvotes: 1
Views: 1102
Reputation: 1323263
Check the output of git branch -avvv
.
If you don't see any remote branch, that means you need to:
git fetch
git branch -u origin/master
From there you will have a comparison between master
and origin/master
.
And you will be able to do a simple git push
.
Upvotes: 7