• Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
all links
  • Git Alias to Show Affected Files in Last N Commits (Example)

    Add this to your user's ~/.gitconfig under [alias] to make it globally available:

    lsch = "!f() { git diff --name-status -r "HEAD~$1"; }; f"

    You can invoke this to retrieve all affected files in the last 7 commits like so:

    $ git lsch 7

    May 3, 2018 - permalink - https://coderwall.com/p/8rtfgg/git-alias-to-show-affected-files-in-last-n-commits
    alias git