How can I generate a git diff of what's changed since the last time I pulled? -
i'd script, preferably in rake, following actions single command:
- get version of local git repository.
- git pull latest code.
- git diff version extracted in step #1 in local repository.
in other words, want latest code form central repository , generate diff of what's changed since last time pulled.
you refspecs.
git pull origin git diff @{1}..
that give diff of current branch existed before , after pull. note if pull doesn't update current branch, diff give wrong results. option explicitly record current version:
current=`git rev-parse head` git pull origin git diff $current..
i use alias shows me log, in reverse order (i.e. oldest newest), sans merges, of commits since last pull. run every time pull updates branch:
git config --global alias.lcrev 'log --reverse --no-merges --stat @{1}..
Comments
Post a Comment