How about (given the comment about it being a template):
create an orphan branch
add just that file to the branch and commit.
Tag the commit 
delete the branch

get folks to 'git checkout tag -- file'. 
Perhaps even make that an alias.

Once it is in the repo it's fixed, unchanged forever!

[or just tweak the alias to checkout the file direct from the sha1 where you 
committed the master version!]

just a thought (all untested..)

--
Philip
  ----- Original Message ----- 
  From: Tikhon Tarnavsky 
  To: Git for human beings 
  Sent: Wednesday, January 06, 2016 6:05 PM
  Subject: [git-users] How to save file's first commit, but ignore all further 
changes to this file?


  Hi all,


  I need to save some file in my git repo in it's current state, ignoring all 
changes to it forever. Any suggestions?

  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to