From: Oleg Broytman Date: Tue, 30 Jun 2015 01:59:47 +0000 (+0300) Subject: Change wording X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=21c8d5852964d132f0608364b7e0546c7657338d;p=git-wiki.git Change wording --- diff --git a/pep-git.txt b/pep-git.txt index 9340703..15ca892 100644 --- a/pep-git.txt +++ b/pep-git.txt @@ -498,24 +498,23 @@ One thing that cannot be undone Whatever you undo, there is one thing that cannot be undone - overwritten uncommitted changes. Uncommitted changes don't belong to -git so git cannot help with them - no way. +git so git cannot help preserving them. Most of the time git warns you when you're going to execute a command that overwrites uncommitted changes. Git warns you when you try to switch branches with ``git checkout``. It warns you when you're going -to rebase with non-clean working tree. It refuses to pull commits over -non-committed files. +to rebase with non-clean working tree. It refuses to pull new commits +over non-committed files. -But there are commands that designed exactly for that - overwriting -files in the working tree. With commands like ``git checkout $PATHs`` -or ``git reset --hard`` git silently overwrites files including your -uncommitted changes. +But there are commands that do exactly that - overwrite files in the +working tree. Commands like ``git checkout $PATHs`` or ``git reset +--hard`` silently overwrite files including your uncommitted changes. With that in mind you can understand the stance "commit early, commit often". Commit as often as possible. Commit on every save in your editor or IDE. You can edit your commits before pushing - change, -reorder, combine. But save your changes in git database, either in -commits or at least in stashes. +reorder, combine, remove. But save your changes in git database, +either commit changes or at least stash them with ``git stash``. Merge or rebase?