mirror of
https://github.com/namibia/tips.git
synced 2024-09-27 13:39:00 +00:00
Tips for log, reset and list currently configuyre remotes
This commit is contained in:
parent
b3cb087c34
commit
679bf0a1d7
11
tips.json
11
tips.json
@ -7,6 +7,9 @@
|
|||||||
}, {
|
}, {
|
||||||
"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": "Show changes over time for specific file",
|
||||||
|
"tip": "git log -p <file_name>"
|
||||||
}, {
|
}, {
|
||||||
"title": "Remove sensitive data from history, after a push",
|
"title": "Remove sensitive data from history, after a push",
|
||||||
"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"
|
"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 @@
|
|||||||
}, {
|
}, {
|
||||||
"title": "Git reset first commit",
|
"title": "Git reset first commit",
|
||||||
"tip": "git update-ref -d HEAD"
|
"tip": "git update-ref -d HEAD"
|
||||||
|
}, {
|
||||||
|
"title": "Reset: preserve uncommitted local changes",
|
||||||
|
"tip": "git reset --keep <commit>"
|
||||||
}, {
|
}, {
|
||||||
"title": "List all the conflicted files",
|
"title": "List all the conflicted files",
|
||||||
"tip": "git diff --name-only --diff-filter=U"
|
"tip": "git diff --name-only --diff-filter=U"
|
||||||
@ -58,7 +64,7 @@
|
|||||||
}, {
|
}, {
|
||||||
"title": "Delete remote branch",
|
"title": "Delete remote branch",
|
||||||
"tip": "git push origin --delete <remote_branchname>",
|
"tip": "git push origin --delete <remote_branchname>",
|
||||||
"alternatives": ["git push origin :<remote_branchname>"]
|
"alternatives": ["git push origin :<remote_branchname>", "git branch -dr <remote/branch>"]
|
||||||
}, {
|
}, {
|
||||||
"title": "Delete local tag",
|
"title": "Delete local tag",
|
||||||
"tip": "git tag -d <tag-name>"
|
"tip": "git tag -d <tag-name>"
|
||||||
@ -409,6 +415,9 @@
|
|||||||
}, {
|
}, {
|
||||||
"title": "Adding Remote name",
|
"title": "Adding Remote name",
|
||||||
"tip": "git remote add <remote-nickname> <remote-url>"
|
"tip": "git remote add <remote-nickname> <remote-url>"
|
||||||
|
}, {
|
||||||
|
"title": "List all currently configured remotes",
|
||||||
|
"tip": "git remote -v"
|
||||||
}, {
|
}, {
|
||||||
"title": "Show the author, time and last revision made to each line of a given file",
|
"title": "Show the author, time and last revision made to each line of a given file",
|
||||||
"tip": "git blame <file-name>"
|
"tip": "git blame <file-name>"
|
||||||
|
Loading…
Reference in New Issue
Block a user