1
0
mirror of https://github.com/namibia/tips.git synced 2024-06-12 23:22:20 +00:00

Merge pull request #144 from eliranmal/master

update remote sync tip, git-ignore idea config
This commit is contained in:
hemanth.hm 2017-03-28 13:51:48 +05:30 committed by GitHub
commit 1078b41bf6
3 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea
node_modules node_modules
npm-debug.log npm-debug.log

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 - overwrite local changes](#sync-with-remote-overwrite-local-changes)
* [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 - overwrite local changes
```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 - overwrite local changes",
"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>"