I have some weird problem using git. I have added and commited my changes. But when pushing to the remote repo : I am told everything is uptodate but it is not. I tried to follow the indications here, but it is still not working, it doesn't seems I have to deal with a detached head. (For informations, the branch I am dealing with is used to push on to seperate remotes). Does anybody has an idea ?
Asked
Active
Viewed 148 times
2 Answers
1
It seems you need to specify the name of the remote where so push your changes.
I.e., in .git/config
it should be like:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = ssh://git.company-repo.com/repo.git
[branch "master"]
remote = origin
merge = refs/heads/master

Sergey K.
- 24,894
- 13
- 106
- 174
-
In fact I used git remote set-head origin mybranch and then I followed this http://stackoverflow.com/questions/999907/git-push-says-everything-up-to-date-even-though-i-have-local-changes and it worked ! – epsilones Nov 12 '12 at 15:09
1
git remote -v
Look at the output for the link that has (push) in it, e.g.
origin git@github.com:username/repo_name.git (fetch)
origin git@github.com:username/repo_name.git (push)
If this is not the case, you'll need to add a remote by doing the following command:
git remote add [repo_name] git@github.com:username/repo_name.git
Then try git pull

jwg2s
- 806
- 1
- 12
- 25