On Friday, January 23, 2015 01:14:03 PM you wrote:
> Stefan Beller <sbel...@google.com> writes:
> 
> >> Ok. How should I then ignore any local changes to the .gitignore
> >> file ? And while taking pull, git should skip this file ?
> >
> > Look at .git/info/exclude
> 
> Good answer for ".gitignore".  In general, you do not "ignore local
> changes" to tracked paths.

There are some configuration files, like `database.yml`, where we generally put 
our local DB credentials and we don't want to share such things. That's why we 
always put related settings inside the .gitignore file. But  while I will 
change it, git will not track the changes of the file, but .gitignore. That's 
why I used the first thread command. But when the time the came to take a `git 
pull`, I got to know about the mess. What should be the ideal decision in this 
case ?

> > I found https://help.github.com/articles/ignoring-files/ as Googles
> > first hit, which advises to use
> >     git update-index --assume-unchanged path/to/file.txt
> > Not sure if that is most helpful advice there.

Yes, I followed the same.

> The piece of advice in the last paragraph on that page is wrong (and
> it has been wrong from the day it was written).
> 
> The gitignore(5) documentation used to have a similar incorrect
> piece of advice but we finally corrected it recently.
> 
> Cf. http://thread.gmane.org/gmane.comp.version-control.git/260954/focus=261118

-- 
================
Regards,
Arup Rakshit
================
Debugging is twice as hard as writing the code in the first place. Therefore, 
if you write the code as cleverly as possible, you are, by definition, not 
smart enough to debug it.

--Brian Kernighan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to