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:

  1. get version of local git repository.
  2. git pull latest code.
  3. 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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -