Show HN: make git ignore certain changed files in repo (gist.github.com) 11 points by false 14y ago ↗ HN
[–] pavel_lishin 14y ago ↗ I'm going to try this next week; this is something we could use at work.Plus, can't beat the license. [–] false 14y ago ↗ I'd be happy to hear your testimonials!I use it at work everyday, it comes in very handy when you need to keep some changes only specific to your local setup (monkey patching, javascript page speed measurements, weird php local config stuff, etc, etc).
[–] false 14y ago ↗ I'd be happy to hear your testimonials!I use it at work everyday, it comes in very handy when you need to keep some changes only specific to your local setup (monkey patching, javascript page speed measurements, weird php local config stuff, etc, etc).
[–] angelbob 14y ago ↗ Nice! I remember being surprised that .gitignore didn't do this. [–] false 14y ago ↗ Right, gitignore can only help with untracked files, not tracked and changed.Back in the day when I was using SVN, its ignore-on-commit feature (GUI only, but anyway) was incredibly useful.
[–] false 14y ago ↗ Right, gitignore can only help with untracked files, not tracked and changed.Back in the day when I was using SVN, its ignore-on-commit feature (GUI only, but anyway) was incredibly useful.
[–] joemi 14y ago ↗ I'm a little confused by what this does... Can't you just not 'git add' a file to have git ignore its changes? [–] false 14y ago ↗ The file still shows up in status and, the most important, changes from file still shows up in 'add|checkout|reset -p' which I use all the time. [–] jeffclark 14y ago ↗ gitignore only works on files that haven't been added. This looks like it's for files already being tracked.
[–] false 14y ago ↗ The file still shows up in status and, the most important, changes from file still shows up in 'add|checkout|reset -p' which I use all the time.
[–] jeffclark 14y ago ↗ gitignore only works on files that haven't been added. This looks like it's for files already being tracked.
[–] jcsalterego 14y ago ↗ 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. [–] landhar 14y ago ↗ How is this better than creating a local branch ? [–] [deleted] 14y ago ↗ (comment deleted) [–] false 14y ago ↗ This has nothing to do with branching. Here is the idea I tried to replicate http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-...
[–] landhar 14y ago ↗ How is this better than creating a local branch ? [–] [deleted] 14y ago ↗ (comment deleted) [–] false 14y ago ↗ This has nothing to do with branching. Here is the idea I tried to replicate http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-...
[–] false 14y ago ↗ This has nothing to do with branching. Here is the idea I tried to replicate http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-...
[–] waffle_ss 14y ago ↗ 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. [–] false 14y ago ↗ Awesome, that'll do as well, thanks
13 comments
[ 2.6 ms ] story [ 30.6 ms ] threadPlus, can't beat the license.
I use it at work everyday, it comes in very handy when you need to keep some changes only specific to your local setup (monkey patching, javascript page speed measurements, weird php local config stuff, etc, etc).
Back in the day when I was using SVN, its ignore-on-commit feature (GUI only, but anyway) was incredibly useful.
It's useful for ignoring checked-in files locally, such as overriding app config settings for a local dev server.