Does 'hg add' ignore '.hgignore'?









up vote
0
down vote

favorite












I am new to Mercurial, having used Git previously. I believe I am using Mercurial incorrectly.



To ignore, e.g. .DS_Store, with git, one would add .DS_Store to .gitignore. Then if one did git add -A, git still wouldn't track .DS_Store.



However, after adding .DS_Store to .hgignore, and then doing hg forget .DS_Store, hg add adds .DS_Store back, as can be confirmed via hg status. The same problem even happens after doing hg forget "set:hgignore()".



Question: What am I doing wrong?










share|improve this question

























    up vote
    0
    down vote

    favorite












    I am new to Mercurial, having used Git previously. I believe I am using Mercurial incorrectly.



    To ignore, e.g. .DS_Store, with git, one would add .DS_Store to .gitignore. Then if one did git add -A, git still wouldn't track .DS_Store.



    However, after adding .DS_Store to .hgignore, and then doing hg forget .DS_Store, hg add adds .DS_Store back, as can be confirmed via hg status. The same problem even happens after doing hg forget "set:hgignore()".



    Question: What am I doing wrong?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am new to Mercurial, having used Git previously. I believe I am using Mercurial incorrectly.



      To ignore, e.g. .DS_Store, with git, one would add .DS_Store to .gitignore. Then if one did git add -A, git still wouldn't track .DS_Store.



      However, after adding .DS_Store to .hgignore, and then doing hg forget .DS_Store, hg add adds .DS_Store back, as can be confirmed via hg status. The same problem even happens after doing hg forget "set:hgignore()".



      Question: What am I doing wrong?










      share|improve this question













      I am new to Mercurial, having used Git previously. I believe I am using Mercurial incorrectly.



      To ignore, e.g. .DS_Store, with git, one would add .DS_Store to .gitignore. Then if one did git add -A, git still wouldn't track .DS_Store.



      However, after adding .DS_Store to .hgignore, and then doing hg forget .DS_Store, hg add adds .DS_Store back, as can be confirmed via hg status. The same problem even happens after doing hg forget "set:hgignore()".



      Question: What am I doing wrong?







      mercurial hgignore






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 11 at 1:24









      hasManyStupidQuestions

      111




      111






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          This was a stupid question, since I just figured out the answer. Since I couldn't find the answer on Google or StackOverflow, I will post it here. If this question is a duplicate, please just delete it (without insulting me).



          Anyway the answer is that I hadn't done hg commit yet. After doing hg forget .DS_Store and then a hg commit, hg add no longer re-adds .DS_Store, since it is located in .hgignore.






          share|improve this answer




















          • To clarify, what was it that you committed that made the difference?
            – DaveInCaz
            Nov 12 at 12:37










          • @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
            – hasManyStupidQuestions
            Nov 12 at 18:20










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245044%2fdoes-hg-add-ignore-hgignore%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          This was a stupid question, since I just figured out the answer. Since I couldn't find the answer on Google or StackOverflow, I will post it here. If this question is a duplicate, please just delete it (without insulting me).



          Anyway the answer is that I hadn't done hg commit yet. After doing hg forget .DS_Store and then a hg commit, hg add no longer re-adds .DS_Store, since it is located in .hgignore.






          share|improve this answer




















          • To clarify, what was it that you committed that made the difference?
            – DaveInCaz
            Nov 12 at 12:37










          • @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
            – hasManyStupidQuestions
            Nov 12 at 18:20














          up vote
          1
          down vote













          This was a stupid question, since I just figured out the answer. Since I couldn't find the answer on Google or StackOverflow, I will post it here. If this question is a duplicate, please just delete it (without insulting me).



          Anyway the answer is that I hadn't done hg commit yet. After doing hg forget .DS_Store and then a hg commit, hg add no longer re-adds .DS_Store, since it is located in .hgignore.






          share|improve this answer




















          • To clarify, what was it that you committed that made the difference?
            – DaveInCaz
            Nov 12 at 12:37










          • @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
            – hasManyStupidQuestions
            Nov 12 at 18:20












          up vote
          1
          down vote










          up vote
          1
          down vote









          This was a stupid question, since I just figured out the answer. Since I couldn't find the answer on Google or StackOverflow, I will post it here. If this question is a duplicate, please just delete it (without insulting me).



          Anyway the answer is that I hadn't done hg commit yet. After doing hg forget .DS_Store and then a hg commit, hg add no longer re-adds .DS_Store, since it is located in .hgignore.






          share|improve this answer












          This was a stupid question, since I just figured out the answer. Since I couldn't find the answer on Google or StackOverflow, I will post it here. If this question is a duplicate, please just delete it (without insulting me).



          Anyway the answer is that I hadn't done hg commit yet. After doing hg forget .DS_Store and then a hg commit, hg add no longer re-adds .DS_Store, since it is located in .hgignore.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 11 at 1:25









          hasManyStupidQuestions

          111




          111











          • To clarify, what was it that you committed that made the difference?
            – DaveInCaz
            Nov 12 at 12:37










          • @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
            – hasManyStupidQuestions
            Nov 12 at 18:20
















          • To clarify, what was it that you committed that made the difference?
            – DaveInCaz
            Nov 12 at 12:37










          • @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
            – hasManyStupidQuestions
            Nov 12 at 18:20















          To clarify, what was it that you committed that made the difference?
          – DaveInCaz
          Nov 12 at 12:37




          To clarify, what was it that you committed that made the difference?
          – DaveInCaz
          Nov 12 at 12:37












          @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
          – hasManyStupidQuestions
          Nov 12 at 18:20




          @DaveInCaz Anything not including the .DS_Store's (i.e. after checking hg status --all to ensure that none were being tracked anymore), the commit works. After the commit, hg add no longer adds back the .DS_Store's.
          – hasManyStupidQuestions
          Nov 12 at 18:20

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245044%2fdoes-hg-add-ignore-hgignore%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          What does pagestruct do in Eviews?

          Dutch intervention in Lombok and Karangasem

          Channel Islands