{"thread":{"id":"38811","subject":"fatal: Unable to mark file .ruby-version","startedAt":"2015-03-15T10:01:18Z","lastAt":"2015-03-16T05:29:12Z","messageCount":6,"participants":["Arup Rakshit","t.gummerer@gmail.com","Kevin D"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"257714","messageId":"1645103.91WotSCBpm@linux-wzza.site","threadId":"38811","inReplyTo":null,"subject":"fatal: Unable to mark file .ruby-version","fromName":"Arup Rakshit","fromEmail":"aruprakshit@rocketmail.com","sentAt":"2015-03-15T10:01:18Z","receivedAt":"2015-03-15T10:01:18Z","isPatch":false,"sender":{"key":"aruprakshit@rocketmail.com","avatar":"https://gravatar.com/avatar/a05a6142b0941fafb88c96b156982deb8e49e863ae7803d15c5147276fdeff92?d=mp&s=160"},"body":"Hi,\n\nI am trying to ignore 2 files, but getting error -\n\n[arup@sztukajedzenia (SJ002)]$ git status\n# On branch SJ002\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       .ruby-gemset\n#       .ruby-version\nnothing added to commit but untracked files present (use \"git add\" to track)\n[arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-gemset\nfatal: Unable to mark file .ruby-gemset\n[arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-version\nfatal: Unable to mark file .ruby-version\n[arup@sztukajedzenia (SJ002)]$\n\nWhy it is throwing error ? And how to achieve this without taking the help of the file `.gitignore` ?\n\n-- \n================\nRegards,\nArup Rakshit\n================\nDebugging 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.\n\n--Brian Kernighan\n"},{"id":"257718","messageId":"20150315123004.GB12619@hank","threadId":"38811","inReplyTo":"1645103.91WotSCBpm@linux-wzza.site","subject":"Re: fatal: Unable to mark file .ruby-version","fromName":"","fromEmail":"t.gummerer@gmail.com","sentAt":"2015-03-15T12:30:04Z","receivedAt":"2015-03-15T12:30:04Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Hi,\n\nOn 03/15, Arup Rakshit wrote:\n> Hi,\n> \n> I am trying to ignore 2 files, but getting error -\n> \n> [arup@sztukajedzenia (SJ002)]$ git status\n> # On branch SJ002\n> # Untracked files:\n> #   (use \"git add <file>...\" to include in what will be committed)\n> #\n> #       .ruby-gemset\n> #       .ruby-version\n> nothing added to commit but untracked files present (use \"git add\" to track)\n> [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-gemset\n> fatal: Unable to mark file .ruby-gemset\n> [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-version\n> fatal: Unable to mark file .ruby-version\n> [arup@sztukajedzenia (SJ002)]$\n\nWith --assume-unchanged you're promising git that you will not change\na file that is already in the repository.  Git doesn't check those\nfiles for changes anymore, which can improve performance.\n\n> Why it is throwing error ? And how to achieve this without taking\n> the help of the file `.gitignore` ?\n\nYou can create a file .git/info/exclude in the root directory of the\nrepository with the same syntax as .gitignore to ignore these files.\nThis rules will not be commited in the repository.\n\n> -- \n> ================\n> Regards,\n> Arup Rakshit\n> ================\n> 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.\n> \n> --Brian Kernighan\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"257722","messageId":"7217253.Nyz2WfkBbo@linux-wzza.site","threadId":"38811","inReplyTo":"20150315123004.GB12619@hank","subject":"Re: fatal: Unable to mark file .ruby-version","fromName":"Arup Rakshit","fromEmail":"aruprakshit@rocketmail.com","sentAt":"2015-03-15T14:21:50Z","receivedAt":"2015-03-15T14:21:50Z","isPatch":false,"sender":{"key":"aruprakshit@rocketmail.com","avatar":"https://gravatar.com/avatar/a05a6142b0941fafb88c96b156982deb8e49e863ae7803d15c5147276fdeff92?d=mp&s=160"},"body":"On Sunday, March 15, 2015 01:30:04 PM you wrote:\n> Hi,\n> \n> On 03/15, Arup Rakshit wrote:\n> > Hi,\n> > \n> > I am trying to ignore 2 files, but getting error -\n> > \n> > [arup@sztukajedzenia (SJ002)]$ git status\n> > # On branch SJ002\n> > # Untracked files:\n> > #   (use \"git add <file>...\" to include in what will be committed)\n> > #\n> > #       .ruby-gemset\n> > #       .ruby-version\n> > nothing added to commit but untracked files present (use \"git add\" to track)\n> > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-gemset\n> > fatal: Unable to mark file .ruby-gemset\n> > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-version\n> > fatal: Unable to mark file .ruby-version\n> > [arup@sztukajedzenia (SJ002)]$\n> \n> With --assume-unchanged you're promising git that you will not change\n> a file that is already in the repository.  Git doesn't check those\n> files for changes anymore, which can improve performance.\n> \n\nI didn't understand your point. Could you please elaborate more on it ?\n\n> > Why it is throwing error ? And how to achieve this without taking\n> > the help of the file `.gitignore` ?\n> \n> You can create a file .git/info/exclude in the root directory of the\n> repository with the same syntax as .gitignore to ignore these files.\n> This rules will not be commited in the repository.\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \n================\nRegards,\nArup Rakshit\n================\nDebugging 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.\n\n--Brian Kernighan\n"},{"id":"257724","messageId":"20150315165819.GA17591@hank","threadId":"38811","inReplyTo":"7217253.Nyz2WfkBbo@linux-wzza.site","subject":"Re: fatal: Unable to mark file .ruby-version","fromName":"","fromEmail":"t.gummerer@gmail.com","sentAt":"2015-03-15T16:58:19Z","receivedAt":"2015-03-15T16:58:19Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 03/15, Arup Rakshit wrote:\n> On Sunday, March 15, 2015 01:30:04 PM you wrote:\n> > Hi,\n> > \n> > On 03/15, Arup Rakshit wrote:\n> > > Hi,\n> > > \n> > > I am trying to ignore 2 files, but getting error -\n> > > \n> > > [arup@sztukajedzenia (SJ002)]$ git status\n> > > # On branch SJ002\n> > > # Untracked files:\n> > > #   (use \"git add <file>...\" to include in what will be committed)\n> > > #\n> > > #       .ruby-gemset\n> > > #       .ruby-version\n> > > nothing added to commit but untracked files present (use \"git add\" to track)\n> > > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-gemset\n> > > fatal: Unable to mark file .ruby-gemset\n> > > [arup@sztukajedzenia (SJ002)]$ git update-index --assume-unchanged .ruby-version\n> > > fatal: Unable to mark file .ruby-version\n> > > [arup@sztukajedzenia (SJ002)]$\n> > \n> > With --assume-unchanged you're promising git that you will not change\n> > a file that is already in the repository.  Git doesn't check those\n> > files for changes anymore, which can improve performance.\n> > \n> \n> I didn't understand your point. Could you please elaborate more on it ?\n\n--assume-unchanged only works on files that you added on the\nrepository, not on untracked files.  Because you don't seem to want\nthese files in the repository, update-index --assume-unchanged will\nnot work for you.\n\n> > > Why it is throwing error ? And how to achieve this without taking\n> > > the help of the file `.gitignore` ?\n> > \n> > You can create a file .git/info/exclude in the root directory of the\n> > repository with the same syntax as .gitignore to ignore these files.\n> > This rules will not be commited in the repository.\n> > \n> > --\n> > To unsubscribe from this list: send the line \"unsubscribe git\" in\n> > the body of a message to majordomo@vger.kernel.org\n> > More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n> -- \n> ================\n> Regards,\n> Arup Rakshit\n> ================\n> 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.\n> \n> --Brian Kernighan\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n\n-- \nThomas Gummerer\n"},{"id":"257728","messageId":"20150315174543.GA11832@vps892.directvps.nl","threadId":"38811","inReplyTo":"20150315165819.GA17591@hank","subject":"Re: fatal: Unable to mark file .ruby-version","fromName":"Kevin D","fromEmail":"me@ikke.info","sentAt":"2015-03-15T17:45:43Z","receivedAt":"2015-03-15T17:45:43Z","isPatch":false,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Sun, Mar 15, 2015 at 05:58:19PM +0100, t.gummerer@gmail.com wrote:\n> On 03/15, Arup Rakshit wrote:\n> > On Sunday, March 15, 2015 01:30:04 PM you wrote:\n> > > \n> > > With --assume-unchanged you're promising git that you will not change\n> > > a file that is already in the repository.  Git doesn't check those\n> > > files for changes anymore, which can improve performance.\n> > > \n> > \n> > I didn't understand your point. Could you please elaborate more on it ?\n> \n> --assume-unchanged only works on files that you added on the\n> repository, not on untracked files.  Because you don't seem to want\n> these files in the repository, update-index --assume-unchanged will\n> not work for you.\n> \n\nAnd to elaborate what on what t.gummerer meant earlier: git update-index\n--assume-unchanged is often abused to ignore already tracked files,\nthinking that they can change the file while git happily ignores it.\n\n--assume-unchanged was neaver built for this purpose, it's built for\nlarge code bases where parts of the code base never changes, and git\nchecking this part would only slow it down. So that's why it's called a\npromise to git that the file never changes, because git doesn't check\nthe status of the file everytime you run git status.\n\nBut because the file is still tracked, any commit that changes the file\ncauses git to still update that file, but git will then protest, because\nit found it the file actually changed in the mean time, and you broke\nthat promise.\n\nBut also already said, this only applies to tracked files, so not to files\nthat aren't being tracked in the first place.\n\nKevin\n"},{"id":"257768","messageId":"186241547.130512.1426483752551.JavaMail.yahoo@mail.yahoo.com","threadId":"38811","inReplyTo":"20150315174543.GA11832@vps892.directvps.nl","subject":"Re: fatal: Unable to mark file .ruby-version","fromName":"Arup Rakshit","fromEmail":"aruprakshit@rocketmail.com","sentAt":"2015-03-16T05:29:12Z","receivedAt":"2015-03-16T05:29:12Z","isPatch":false,"sender":{"key":"aruprakshit@rocketmail.com","avatar":"https://gravatar.com/avatar/a05a6142b0941fafb88c96b156982deb8e49e863ae7803d15c5147276fdeff92?d=mp&s=160"},"body":"\n\nOn Sunday, 15 March 2015 11:15 PM, Kevin D <me@ikke.info> wrote:\nOn Sun, Mar 15, 2015 at 05:58:19PM +0100, t.gummerer@gmail.com wrote:\n> On 03/15, Arup Rakshit wrote:\n> > On Sunday, March 15, 2015 01:30:04 PM you wrote:\n> > > \n> > > With --assume-unchanged you're promising git that you will not change\n> > > a file that is already in the repository.  Git doesn't check those\n> > > files for changes anymore, which can improve performance.\n> > > \n> > \n> > I didn't understand your point. Could you please elaborate more on it ?\n> \n> --assume-unchanged only works on files that you added on the\n> repository, not on untracked files.  Because you don't seem to want\n> these files in the repository, update-index --assume-unchanged will\n> not work for you.\n> \n\nAnd to elaborate what on what t.gummerer meant earlier: git update-index\n--assume-unchanged is often abused to ignore already tracked files,\nthinking that they can change the file while git happily ignores it.\n\n--assume-unchanged was neaver built for this purpose, it's built for\nlarge code bases where parts of the code base never changes, and git\nchecking this part would only slow it down. So that's why it's called a\npromise to git that the file never changes, because git doesn't check\nthe status of the file everytime you run git status.\n\nBut because the file is still tracked, any commit that changes the file\ncauses git to still update that file, but git will then protest, because\nit found it the file actually changed in the mean time, and you broke\nthat promise.\n\nBut also already said, this only applies to tracked files, so not to files\nthat aren't being tracked in the first place.\n\nKevin\n\n\nThanks both of you. As per your suggestions I resolved it. I found a good link on this topic too \nhttps://help.github.com/articles/ignoring-files/.\n\n\nRegards,\nArup Rakshit\n"}]}