Skip to content

Commit 3c76683

Browse files
author
eliranm
committed
update "overwrite pull":
- rename to "sync with remote" for clarity - add 'git clean' to ensure working tree is clean
1 parent 77c865c commit 3c76683

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
1414
* [Everyday Git in twenty commands or so](#everyday-git-in-twenty-commands-or-so)
1515
* [Show helpful guides that come with Git](#show-helpful-guides-that-come-with-git)
1616
* [Search change by content](#search-change-by-content)
17-
* [Overwrite pull](#overwrite-pull)
17+
* [Sync with remote](#sync-with-remote)
1818
* [List of all files till a commit](#list-of-all-files-till-a-commit)
1919
* [Git reset first commit](#git-reset-first-commit)
2020
* [List all the conflicted files](#list-all-the-conflicted-files)
@@ -185,9 +185,9 @@ git help -g
185185
git log -S'<a term in the source>'
186186
```
187187

188-
## Overwrite pull
188+
## Sync with remote
189189
```sh
190-
git fetch origin && git reset --hard origin/master
190+
git fetch origin && git reset --hard origin/master && git clean -f -d
191191
```
192192

193193
## List of all files till a commit

tips.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"title": "Search change by content",
99
"tip": "git log -S'<a term in the source>'"
1010
}, {
11-
"title": "Overwrite pull",
12-
"tip": "git fetch origin && git reset --hard origin/master"
11+
"title": "Sync with remote",
12+
"tip": "git fetch origin && git reset --hard origin/master && git clean -f -d"
1313
}, {
1414
"title": "List of all files till a commit",
1515
"tip": "git ls-tree --name-only -r <commit-ish>"

0 commit comments

Comments
 (0)