diff --git a/.gitignore b/.gitignore index 93f1361..67d713f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.idea node_modules npm-debug.log diff --git a/README.md b/README.md index 8be62cf..8d2a553 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 - overwrite local changes](#sync-with-remote-overwrite-local-changes) * [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 - overwrite local changes ```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..90526c8 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 - overwrite local changes", + "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 "