From 8c58f5617cb824d68257bcc17a077f012e7f5b02 Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Tue, 30 Apr 2019 21:52:10 +0000 Subject: Minor edits, mostly capitalization and headings --- doc/topics/git/git-tricks.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/topics/git/git-tricks.md b/doc/topics/git/git-tricks.md index 622b8c906bf..c0e04b18d62 100644 --- a/doc/topics/git/git-tricks.md +++ b/doc/topics/git/git-tricks.md @@ -1,6 +1,6 @@ # Git tricks -Here are some commands that you may not need to use every day, but which can come in +Here are some commands that you may not need to use often, but which can come in handy when needed. ## bash @@ -53,32 +53,34 @@ add `--no-edit` to NOT edit the commit message or `git stash` -### unstash your changes +### Unstash your changes `git stash apply` -### discard your stashed changes +### Discard your stashed changes `git stash drop` -### apply and drop your stashed changes +### Apply and drop your stashed changes `git stash pop` -### check the git history of a file +### Check the git history of a file -```git log -- -git log ``` +``` +git log -- +git log +``` -### find the tags that contain a particular SHA +### Find the tags that contain a particular SHA `git tag --contains ` -### check the content of each change to a file +### Check the content of each change to a file `gitk ` -### check the content of each change to a file, follows it past file renames +### Check the content of each change to a file, follows it past file renames `gitk --follow ` @@ -90,7 +92,7 @@ git log ``` ### Debug cloning -`GIT_SSH_COMMAND="ssh -vvv" git clone ` with SSH +`GIT_SSH_COMMAND="ssh -vvv" git clone ` with SSH `GIT_TRACE_PACKET=1 GIT_TRACE=2 GIT_CURL_VERBOSE=1 git clone ` with HTTPS ## Rebasing @@ -105,12 +107,12 @@ The -i flag stands for 'interactive' `git rebase --continue` -### Additional rebasing tips +### Use git rerere -Rerere _reuses_ recorded solutions to the same problems when repeated +`git rerere` _reuses_ recorded solutions to the same problems when repeated `git config --global rerere.enabled true` -Use the reference log (reflog) to show the log of reference changes to HEAD +### Use reflog to show the log of reference changes to HEAD `git reflog` \ No newline at end of file -- cgit v1.2.1