The Git FAQ has an entry of note:
Why won't I see changes in the remote repo after "git push"? The push operation is always about propagating the repository history and updating the refs, and never touches the working tree files. In particular, if you push to update the branch that is checked out in a remote repository the files in the work tree will not be updated.
This is a feature not a bug, despite what certain other bloggers will tell you. Why? Because you might have some uncommitted changes in the remote repo - and you don't want a git-push from somewhere wiping them out without getting a chance to commit them.
That being said, suppose you do want the remote repo to automatically update its working tree when you do a git-push. Well, you can get a nice post-update hook here http://utsl.gen.nz/git/post-update
Or, if you are certain your remote repo hasn't been changed (git-status can help you find this out) then you can simply run:
remote$ git reset --hard HEAD
... on it (the remote repo) and the repo there will match the repo that you pushed from.
(Oh yeah, this tip obviously only applies to remote repos that haven't been initialised with the --bare option... so it only applies to a specific type of workflow.)
Django Python 960.gs Git Vim NetBSD Nginx
This is the blog of Brad Willis, a software engineer living in Brisbane.
Help
Latest entries
*BSD Agile Apache Apple apt Athletics Best-Practice Censorship Chrome Comedy Cool Crosswords Deployment Django English Exim Firefox Git Hardcore Health irssi Javascript Jira Languages Linux Makefile Mathematics Mobile Broadband Mutt MySQL NetBSD nginx Nokia OpenVZ OSX Perl Postfix Privacy Python Rant Requirements rsync Ruby Shell Slackware SQL SQLite SSH Standards Subversion Television Testing ThisBlog Vim VMWare (Fusion) VPN X zsh
gvim - Always open new files as new tabs
crontab - escape % (percentage)
OSX Google Chrome - start in incognito mode
SQLite date arithmetic
Postfix - delete message in mailq
Checking for exceptions in doctests
Homer's Curling Speech
retry in Python
Vim Makefile tabs
Centos (or RH) IPTables
Converting ssh2 public keys to openssh
Vim comment hints
Context managers in Perl
Dish rotation
Git - fixing commit user
apt stuff
Using shell variables in AWK
Linux - Too many open files
Tell gvim to save and quit... remotely
Vim - automatically remove whitespace at EOL
Python - relative paths from within modules
TV Aspect Ratios
Git - Which commits are in your branch only?
Subversion setup cheat sheet
Force detach a screen session
Modify sudo's use of environment variables
Install all Perl modules
Mutt - delete old messages
OpenVZ VPS and swap space
fail2ban on NetBSD for ssh
NetBSD - Using sup
Python - testing for a sys.exit
Python Best Practice Link Dump
Python script names
Perl - Using an expensive module
Speed of git clone
Perl Modules with Custom Prefix
Perl: tr vs. s
Brilliant sysadmin Reference
Why is GRUB better than LILO?