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?
mercurial hgignore
add a comment |
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?
mercurial hgignore
add a comment |
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?
mercurial hgignore
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
mercurial hgignore
asked Nov 11 at 1:24
hasManyStupidQuestions
111
111
add a comment |
add a comment |
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.
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 checkinghg status --allto ensure that none were being tracked anymore), the commit works. After the commit,hg addno longer adds back the.DS_Store's.
– hasManyStupidQuestions
Nov 12 at 18:20
add a comment |
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.
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 checkinghg status --allto ensure that none were being tracked anymore), the commit works. After the commit,hg addno longer adds back the.DS_Store's.
– hasManyStupidQuestions
Nov 12 at 18:20
add a comment |
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.
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 checkinghg status --allto ensure that none were being tracked anymore), the commit works. After the commit,hg addno longer adds back the.DS_Store's.
– hasManyStupidQuestions
Nov 12 at 18:20
add a comment |
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.
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.
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 checkinghg status --allto ensure that none were being tracked anymore), the commit works. After the commit,hg addno longer adds back the.DS_Store's.
– hasManyStupidQuestions
Nov 12 at 18:20
add a comment |
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 checkinghg status --allto ensure that none were being tracked anymore), the commit works. After the commit,hg addno 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
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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