How to undo a git pull?

Or to make it more explicit than the other answer: git pull whoops? git reset –keep HEAD@{1} Versions of git older than 1.7.1 do not have –keep. If you use such version, you could use –hard – but that is a dangerous operation because it loses any local changes. To the commenter ORIG_HEAD is previous … Read more

How can I make my local repository available for git-pull?

Five possibilities exist to set up a repository for pull from: local filesystem: git clone /path/to/repo or git clone file://path/to/repo. Least work if you have networked filesystem, but not very efficient use of network. (This is almost exactly solution proposed by Joakim Elofsson) HTTP protocols: git clone http://example.com/repo. You need any web server, and you … Read more