git stash equivalents in other revision control systems?

后端 未结 3 1585
盖世英雄少女心
盖世英雄少女心 2020-12-06 01:09

Does hg, svn or others have an option like git stash?

相关标签:
3条回答
  • 2020-12-06 01:48

    If you don't want to use shelves, you can do it the following way.

    hg diff > mylocalchanges.txt
    hg revert -a
    # Do your merge here, once you are done, import back your local mods
    hg import --no-commit mylocalchanges.txt
    
    0 讨论(0)
  • 2020-12-06 01:53

    The general name for that feature is:

    Shelving: the ability to actually upload intermediate revisions to the server without really checking them in.
    In a CVCS (Centralized VCS), you actually need to upload those intermediate data to a central server.
    But in a DVCS (Distributed VCS), you just need to store them in a the local repository.

    There is:

    • the shelve extension for Mercurial
    • temporary branches for SVN, or patch files
    • p4tar (again patch based) for Perforce, even though the Perforce 2009.2 has now shelve and unshelve features.
    • saved checked-out data in Plastic SCM (for shelving data)

    You can find all the other SCM shelving commands in this SCM comparison table on Wikipedia.

    • Accurev: keep / co (this is disputed in this question)
    • Bazaar: shelve / unshelve
    • Darcs: revert / unrevert
    0 讨论(0)
  • 2020-12-06 01:54

    Jazz Source Control, integrated in IBM Rational Team Concert supports this functionality. It is called "Suspend".

    From the Jazz.net site: "Jazz allows you to temporarily remove a change set from your workspace by suspending it. At some point in the future, you can resume the change set and continue working on it."

    Jazz Source Control FAQ

    0 讨论(0)
提交回复
热议问题