It should be either "Reset File…" or simply "Reset…", but either way the option should include an ellipsis in its name to indicate that a dialog box will appear when the option is selected, it won't be executed immediately without question. Keep in mind, however, that you cannot undo this git restore index. Suggestion: Change both menu options to use the same text. If you want to discard uncommitted local changes in a file, simply omit the -staged flag. This obliterates not only the uncommitted changes. The distinction between the two is in the noun they act on, so that should be included in the drop-down: Remove File. Coming from git, I know the difference, but I still need to stop and think about which one I actually want each time. ![]() They appear to mean the same thing, to delete the file from the filesystem, but actually they mean to discard the changes made to the file and delete the file, respectively.Īdding to the confusion, if I open the contextual menu for one of the unstaged files, I get a menu with several options, including "Reset…" As it turns out, that option does the same thing as the "Discard File" option from the ellipsis menu. Move the current branch tip backward to and reset both the staging area and the working directory to match. When you right-click on a file, youre given the option to 'Remove' or 'Discard,' two synonymous verbs. If you try to push you will get the following message. Any uncommitted work will be taken along to the new branch. Just use: git checkout -b feature/newbranch. Alternatively, you can reapply the changes to your working copy and keep them in your stash with git stash apply: git stash apply On branch main Changes to be committed: new file: style.css Changes not staged for commit: modified: index.html. The answer is Click on commit Select all by pressing CMD+A that you want to delete or discard Right click on the selected uncommitted files that you want to. Like stated in this question: Git: Create a branch from unstagged/uncommited changes on master: stash is not necessary. If I try to to git clean -fd ( How to discard uncommitted changes in. Popping your stash removes the changes from your stash and reapplies them to your working copy. In Git Extension I can simply delete the all files, but I cannot find how to do it with SourceTree. ![]() Clicking on the ellipsis button reveals a menu of several items, including "Discard File" and "Remove File". When a merge fails I get a lot of new untracked files, if I want to redo the commit it fails because the files would be overwritten. Each file appears with a checkbox, status icon, name, and an ellipsis button. ![]() When I've made changes to files in a project, they appear under the "Unstaged files" heading on the "File status" screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |