0

I included Dockerfile in .gitignore file. While migrating from branch A to B and B to C, the Dockerfile was ignored as needed. But in branch C, I committed changes in Dockerfile manually on Gitlab. Later when I merged C to D, the Dockerfile did not get ignored by .gitignore. How do I handle this case?

David Maze
  • 130,717
  • 29
  • 175
  • 215
  • 2
    I thought gitignore doesn't have an effect on files that are already tracked? Maybe this question/answer will help: [How do I make Git forget about a file that was tracked, but is now in .gitignore?](https://stackoverflow.com/a/1274447/5747944) – sytech Jul 15 '22 at 16:55
  • 1
    I hope when your run git add -A it doesn't add the listed file – wojand Jul 15 '22 at 16:58

0 Answers0