To do this, select the file or changelist you want to shelve and click the Shelve Silently icon on the toolbar or press Command Shift H. You can also shelve changes silently, without displaying the Shelve Changes dialog. In the Commit Message field, enter the name of the shelf to be created and click the Shelve Changes button. In the Shelve Changes dialog, review the list of modified files. In the Commit tool window Alt+0, right-click the files or the changelist you want to shelve and select Shelve changes from the context menu. Once shelved, a change can be applied as many times as you need. You cannot shelve unversioned files, which are files that have not been added to version control. With IntelliJ IDEA, you can shelve both separate files and entire changelists. This is useful, for example, if you need to switch to another task, and you want to set your changes aside to work on them later. Shelving is temporarily storing pending changes you have not committed yet. You can create branches to work on different unrelated features. You can keep changes related to different tasks or features in different changelists. Also, stashing involves all uncommitted changes, while when you put changes to a shelf, you can select some of the local changes instead of shelving them all. Patches with shelved changes are generated by IntelliJ IDEA and are also applied through the IDE. Stashes are generated by Git, and can be applied from within IntelliJ IDEA, or outside it. The only difference is in the way patches are generated and applied. Stashing changes is very similar to shelving. IntelliJ IDEA provides you with a few ways to conveniently work on several different features without losing your work: For 19.2 we will try to be more selective here when to require a clean working tree and when not.Sometimes you need to switch between different tasks with things left unfinished and then return back to them. Now, combining both, you will run into the problem that SmartGit will ask you to auto-stash before performing a history-related operation, but then will not actually stash the untracked files and hence the operation fails because the working tree is not clean.Ī quick solution to the problem is to enable stashing of untracked files in the Preferences, section Commands, Stash. That’s behavior already present in version 18.2. However there is some problem in SmartGit 19.1’s logic though: SmartGit is not stashing untracked files by default, because certain SmartGit users think that SmartGit must not touch untracked files at all. Hence, we require a clean working tree in general. It’s not clear whether all of these operations in combination with the interactive rebase can cope perfectly with untracked files for different scenarios (e.g. This is especially true for history-related operations, for which SmartGit is now using Git’s interactive rebase feature. In general, SmartGit considers untracked files more important than Git in various places (if not important, why not ignore them?). A couple of users have complained about changes to the auto-stashing behavior in version 19.1 (compared to 18.2): for various history-related operations (like reordering, squashing of splitting commits), SmartGit 19.1 is now requiring a clean working tree where SmartGit 18.2 did not and also Git command line does not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |