6 ms·
> After years of using git I got back to svn You get the best of both worlds--a sane set of commands and a distributed version control system--by using Mercuri
by alwillis 1y ago
> After years of using git I got back to svn
You get the best of both worlds--a sane set of commands and a distributed version control system--by using Mercurial [1].
Checking Status:
SVN: svn status
Mercurial: hg status
Adding Files:
SVN: svn add <filename>
Mercurial: hg add <filename>
Committing Changes:
SVN: svn commit -m "Commit message" (commits changes directly to the central repository)
Mercurial: hg commit -m "Commit message" (commits changes to the local repository) and hg push (sends local commits to a remote repository)
Deleting/Removing Files:
SVN: svn delete <filename> or svn remove <filename>
Mercurial: hg remove <filename> or hg rm <filename>
Viewing History:
SVN: svn log
Mercurial: hg log
Viewing Differences:
SVN: svn diff
Mercurial: hg diff
Branching:
SVN: svn copy <source_URL> <destination_URL> (creates a branch by copying a directory in the repository)
Mercurial: hg branch <branchname> (creates a new named branch within the repository)
Reverting Changes:
SVN: svn revert <filename> (reverts local modifications) or svn merge -r <revision>:<revision> <URL> (for more complex reverts)
Mercurial: hg revert <filename> (reverts local modifications) or hg backout <changeset> (to undo a specific commit)
[1]: https://www.mercurial-scm.org https://www.mercurial-scm.org