mercurial hg command line with portableapps portable cmd.exe
hg init (inside of a directory to create a repository = creates the .hg folder)
notepad .hg/hgrc (create a text file to for hg configuration - fully portable) [ui] username = Firstname Lastname email@domain.com verbose = True
hg showconfig (show the combination of all Config files)
cd .. (go back to the root directory we're versioning)
hg add (recursively identify all these files as interesting)
hg status (lists all of the files that need to be added / have been modified)
hg commit -m "Every commit requires a comment"
(actually storing the contents of these files - save!) (note that if we don't use -m we have to specify and save in notepad)
hg status (shows nothing new or interesting)
mkdir testdir cd testdir echo test3 > test3.txt echo test4 > test4.txt
hg status (now we see new files we could commit)
hg add
hg commit (again, we need to enter a comment and SAVE)
hg log
hg remove testdir\test3.txt (could have also been .\testdir\test3.txt) hg status (R testdir\test3.txt)
Note that this prevents future tracking
moving files around is best done in mercurial, but you can fix it afterwards with:
hg help addremove (or hg -v help addremove)
hg addremove --similarity 100 (100% the same will have the versioning migrated) hg addremove -n (dry run output of what would have happened)
hg commit -m "moved files but then used hg addremove --similarity 100"
You want an empty directory in your repo? http://hgbook.red-bean.com/read/mercurial-in-daily-use.html
hg init hidden-example $ cd hidden-example $ mkdir empty $ touch empty/.hidden $ hg add empty/.hidden $ hg commit -m 'Manage an empty-looking directory' $ ls empty $ cd .. $ hg clone hidden-example tmp updating working directory 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ ls tmp empty $ ls tmp/empty