6

It seems like a simple question, but why does this file have a question mark in front of it after I have run the commands "Hg push" and "Hg commit". How do I get this new file to upload to the mercurial server? Why did my mercurial commit leave behind a file?

    @Xinl ➜  projectfolder  hg status
    ? data/openend_coding/soundex_unaidedlogopay1.py
polka
  • 1,383
  • 2
  • 25
  • 40

1 Answers1

14

Quote from hg help status (hg's help is quite extensive and always worth a look!):

The codes used to show the status of files are:

  M = modified
  A = added
  R = removed
  C = clean
  ! = missing (deleted by non-hg command, but still tracked)
  ? = not tracked
  I = ignored
    = origin of the previous file (with --copies)

Before mercurial tracks a file you have to tell it to actually do so by means of hg add. Untracked files are never committed.

planetmaker
  • 5,884
  • 3
  • 28
  • 37