Stash A File With SourceTree

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

This article should help users to perform a git stash with SourceTree.

ソリューション

Read here to learn more about git stash operations: https://git-scm.com/book/en/v1/Git-Tools-Stashing

A mercurial equivalent of Stash is called Shelve: https://www.mercurial-scm.org/wiki/ShelveExtension

  • If a mercurial repository is opened in SourceTree, the function will appear as Shelve instead of git's Stash.

To stash your changes:

  1. First, there has to be a change done to a file.
  2. Once there's a change, then the Stash button at the dashboard will be enabled by SourceTree to be used:

Clicking on Stash will trigger this window to pop up:

手順:

  1. Enter a description message
  2. Check "Keep staged changes" if you want to keep the rest of the changes that are staged.
  3. OK をクリックします。

You will then notice a new column that appears at the sidebar, called Stashes. And the file is now changed back to the state before it was modified:

To apply back the changes, simply right-click on the Stash created, and click Apply Stash. Your file should revert back to the modified version:

最終更新日: 2016 年 2 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.