1
0
mirror of https://github.com/namibia/tips.git synced 2024-12-22 10:08:58 +00:00

update "overwrite pull":

- rename to "sync with remote" for clarity
- add 'git clean' to ensure working tree is clean
This commit is contained in:
eliranm 2017-03-28 11:07:51 +03:00
parent 77c865cedf
commit 3c766833b4
2 changed files with 5 additions and 5 deletions

View File

@ -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) * [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) * [Show helpful guides that come with Git](#show-helpful-guides-that-come-with-git)
* [Search change by content](#search-change-by-content) * [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) * [List of all files till a commit](#list-of-all-files-till-a-commit)
* [Git reset first commit](#git-reset-first-commit) * [Git reset first commit](#git-reset-first-commit)
* [List all the conflicted files](#list-all-the-conflicted-files) * [List all the conflicted files](#list-all-the-conflicted-files)
@ -185,9 +185,9 @@ git help -g
git log -S'<a term in the source>' git log -S'<a term in the source>'
``` ```
## Overwrite pull ## Sync with remote
```sh ```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 ## List of all files till a commit

View File

@ -8,8 +8,8 @@
"title": "Search change by content", "title": "Search change by content",
"tip": "git log -S'<a term in the source>'" "tip": "git log -S'<a term in the source>'"
}, { }, {
"title": "Overwrite pull", "title": "Sync with remote",
"tip": "git fetch origin && git reset --hard origin/master" "tip": "git fetch origin && git reset --hard origin/master && git clean -f -d"
}, { }, {
"title": "List of all files till a commit", "title": "List of all files till a commit",
"tip": "git ls-tree --name-only -r <commit-ish>" "tip": "git ls-tree --name-only -r <commit-ish>"