From 3c766833b4625753b254645c4d619b9b176781cd Mon Sep 17 00:00:00 2001 From: eliranm Date: Tue, 28 Mar 2017 11:07:51 +0300 Subject: [PATCH] update "overwrite pull": - rename to "sync with remote" for clarity - add 'git clean' to ensure working tree is clean --- README.md | 6 +++--- tips.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8be62cf..c518583 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Everyday Git in twenty commands or so](#everyday-git-in-twenty-commands-or-so) * [Show helpful guides that come with Git](#show-helpful-guides-that-come-with-git) * [Search change by content](#search-change-by-content) -* [Overwrite pull](#overwrite-pull) +* [Sync with remote](#sync-with-remote) * [List of all files till a commit](#list-of-all-files-till-a-commit) * [Git reset first commit](#git-reset-first-commit) * [List all the conflicted files](#list-all-the-conflicted-files) @@ -185,9 +185,9 @@ git help -g git log -S'' ``` -## Overwrite pull +## Sync with remote ```sh -git fetch origin && git reset --hard origin/master +git fetch origin && git reset --hard origin/master && git clean -f -d ``` ## List of all files till a commit diff --git a/tips.json b/tips.json index 0c5a3e2..9d3b1ce 100644 --- a/tips.json +++ b/tips.json @@ -8,8 +8,8 @@ "title": "Search change by content", "tip": "git log -S''" }, { - "title": "Overwrite pull", - "tip": "git fetch origin && git reset --hard origin/master" + "title": "Sync with remote", + "tip": "git fetch origin && git reset --hard origin/master && git clean -f -d" }, { "title": "List of all files till a commit", "tip": "git ls-tree --name-only -r "