New and experienced Git users alike are finding out too late that they forgot to enable reflogs in the current repository, and cannot use the information stored within it to recover from an incorrectly entered command such as `git reset --hard HEAD^^^` when they really meant HEAD^^ (aka HEAD~2). So enable reflogs by default in all future versions of Git, unless the user specifically disables it with: [core] logAllRefUpdates = false in their .git/config or ~/.gitconfig. Documentation was also updated to indicate the new default behavior. We probably should start to teach usuing the reflog to recover from mistakes in some of the tutorial material, as new users are likely to make a few along the way and will feel better knowing they can recover from them quickly and easily, without fsck-objects' lost+found features. Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> --- Documentation/config.txt | 3 ++- environment.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index a3587f8..e093bcd 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -80,7 +80,8 @@ core.logAllRefUpdates:: This information can be used to determine what commit was the tip of a branch "2 days ago". This value is - false by default (no automated creation of log files). + true by default to activate automated creation of log + files for all branch heads. core.repositoryFormatVersion:: Internal variable identifying the repository format and layout diff --git a/environment.c b/environment.c index 84d870c..98275b2 100644 --- a/environment.c +++ b/environment.c @@ -15,7 +15,7 @@ int use_legacy_headers = 1; int trust_executable_bit = 1; int assume_unchanged; int prefer_symlink_refs; -int log_all_ref_updates; +int log_all_ref_updates = 1; int warn_ambiguous_refs = 1; int repository_format_version; char git_commit_encoding[MAX_ENCODING_LENGTH] = "utf-8"; -- 1.4.4.2.g72f5 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html