Live data from Hacker News

Show HN: make git ignore certain changed files in repo

gist.github.com

11–14 of 14 posts

Re: Show HN: make git ignore certain changed files in repo

#11
post #10

For those who aren't familiar with the git subcommand, `git update-index --[no-]assume-unchanged` is at the core of this script. It's useful for ignoring checked-in files locally , such as overriding app config settings for a local dev server.

How is this better than creating a local branch ?

[deleted]

Re: Show HN: make git ignore certain changed files in repo

#12
post #10

For those who aren't familiar with the git subcommand, `git update-index --[no-]assume-unchanged` is at the core of this script. It's useful for ignoring checked-in files locally , such as overriding app config settings for a local dev server.

How is this better than creating a local branch ?

This has nothing to do with branching. Here is the idea I tried to replicate http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-...

Re: Show HN: make git ignore certain changed files in repo

#13
These are the aliases I have set in my .gitconfig for a similar (same?) purpose:

  [alias]
  ignore = !git update-index --assume-unchanged
  unignore = !git update-index --no-assume-unchanged
  ignored = !git ls-files -v | grep "^[[:lower:]]"
Usage: `git ignore foo.rb`, `git unignore foo.rb`; `git ignored` to list all currently ignored files.

Re: Show HN: make git ignore certain changed files in repo

#14

These are the aliases I have set in my .gitconfig for a similar (same?) purpose: [alias] ignore = !git update-index --assume-unchanged unignore = !git update-index --no-assume-unchanged ignored = !git ls-files -v | grep "^[[:lower:]]" Usage: `git ignore foo.rb`, `git unignore foo.rb`; `git ignored` to list all currently ignored files.

Awesome, that'll do as well, thanks
Post reply on HN