Skip to content

Commit a6e02cc

Browse files
authored
Merge pull request #172 from amarduwal/master
Tips for log, reset and list currently configure remotes
2 parents fbbed06 + 679bf0a commit a6e02cc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tips.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
}, {
88
"title": "Search change by content",
99
"tip": "git log -S'<a term in the source>'"
10+
}, {
11+
"title": "Show changes over time for specific file",
12+
"tip": "git log -p <file_name>"
1013
}, {
1114
"title": "Remove sensitive data from history, after a push",
1215
"tip": "git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch <path-to-your-file>' --prune-empty --tag-name-filter cat -- --all && git push origin --force --all"
@@ -19,6 +22,9 @@
1922
}, {
2023
"title": "Git reset first commit",
2124
"tip": "git update-ref -d HEAD"
25+
}, {
26+
"title": "Reset: preserve uncommitted local changes",
27+
"tip": "git reset --keep <commit>"
2228
}, {
2329
"title": "List all the conflicted files",
2430
"tip": "git diff --name-only --diff-filter=U"
@@ -58,7 +64,7 @@
5864
}, {
5965
"title": "Delete remote branch",
6066
"tip": "git push origin --delete <remote_branchname>",
61-
"alternatives": ["git push origin :<remote_branchname>"]
67+
"alternatives": ["git push origin :<remote_branchname>", "git branch -dr <remote/branch>"]
6268
}, {
6369
"title": "Delete local tag",
6470
"tip": "git tag -d <tag-name>"
@@ -409,6 +415,9 @@
409415
}, {
410416
"title": "Adding Remote name",
411417
"tip": "git remote add <remote-nickname> <remote-url>"
418+
}, {
419+
"title": "List all currently configured remotes",
420+
"tip": "git remote -v"
412421
}, {
413422
"title": "Show the author, time and last revision made to each line of a given file",
414423
"tip": "git blame <file-name>"

0 commit comments

Comments
 (0)