Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 3
    I had to replace awk with gawk for msysgit, but otherwise it worked perfectly. Thanks! Commented May 22, 2011 at 16:09
  • 6
    helo ken. would you mind sharing your script that checksfor symlink text files and replaces them with symlinks on windows using mklink. while this actually works for us the --assume-unchanged part doesn't. on switching to another branch git says the symlink files are changed and need to be commited first, while git status says there are no changes..any idea? Commented Oct 5, 2011 at 22:45
  • 7
    Here's a PowerShell one I just put together - gist.github.com/ferventcoder/7995025 Commented Dec 16, 2013 at 21:48
  • 4
    @flungo There are more portable ways to print the fourth column than using GNU awk. For example: git ls-files -s | grep '^12' | cut -f2 (second tab-delimited column; other columns are space-delimited) Commented Apr 5, 2016 at 3:01
  • 2
    One liner for Cygwin/bash to mark all symlinks unchanged: for f in `git ls-files -s | awk '/120000/{print $4}'`; do git update-index --assume-unchanged $f; done Commented Aug 29, 2016 at 20:52