Been using git for a few months now and this one has me stumped. We have a git repo on AWS EC2. Syncing is fine and works right out of the box using gitosis. The only issue we have is when you pull you sometimes get an older version of some files. My setup is like this:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote “origin”]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@blahblahblah:/Project
[branch “master”]
remote = origin
merge = refs/heads/master
git remote show origin
- remote origin
Fetch URL: git@blahblahblah:/Project
Push URL: git@blahblahblah:/Project
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 pushes to master (up to date)
I work from my own branch, lets say mybranch and merge to the master. The strange thing is the latest files are present on the server as I can see them through gitk but it does not seem to pull the very latest.
Any ideas?
If you “git push” a branch to the origin repository you are updating the git repository but not the files on disk. You need to “git checkout ” on the origin (EC2) repository in order to apply the repository to the local files.