From 7f2b96b84c2edd28976d45303409935794fc9abb Mon Sep 17 00:00:00 2001 From: Darkstar-agent Date: Tue, 22 Sep 2020 08:12:51 +0300 Subject: [PATCH] ongoing additions, changes, and fixes --- git-and-github-cheat-sheet.adoc | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 git-and-github-cheat-sheet.adoc diff --git a/git-and-github-cheat-sheet.adoc b/git-and-github-cheat-sheet.adoc new file mode 100644 index 0000000..e02587b --- /dev/null +++ b/git-and-github-cheat-sheet.adoc @@ -0,0 +1,34 @@ += Git and github.com cheat sheet +:author: Yuri Slobodyanyuk + +[cols=2,options="header"] +|=== +|command +|Description + +|*git clone [local repo name]* +| Clone remote repository, optionally renaming the local copy of it. + +|*git config --system * +|Set configuration parameters for all users at the local host, requires root permissions. Saves in the +/etc/gitconfig+. Some params (when setting, separate paramater value from name with whitespace): + +- +core.editor+ Editor to use to enter comments when committing. E.g. `git config --system core.editor vim`. + +- +diff.tool+ Diff tool to use, e.g. `vimdiff`,`vimdiff2`,`xxdiff`,`gvimdiff` + +- +user.email+ Email to be incldued in each commit. + +- +user.name+ Full name to be included in each commit. + + + +|*git config --global * +|Set for ALL repositories of a user on the local host. Saves in the +~/.gitconfig+ or +~/.config/git/config+. + +|*git config --local * +|(default) Set for a specific repository only, should be run when inside this repository. Saves in the +.git/config+ inside the repository. + +|*git config --list --show-origin* +|View all the settings with their origins. + +|===