WGU D197 VERSION CONTROL
COMPREHENSIVE QUESTIONS AND
SOLUTIONS
◉ Location of .gitconfig file.
Answer: $ pwd
/c/Users/napst
napst@DESKTOP-7Q12MG7 MINGW64 ~
$ ls -la
total 90897
drwxr-xr-x 1 napst 197609 0 Jul 1 12:01 ./
drwxr-xr-x 1 napst 197609 0 May 21 01:28 ../
...
drwxr-xr-x 1 napst 197609 0 Mar 29 22:03 .continuum/
drwxr-xr-x 1 napst 197609 0 Jun 25 19:58 .dotnet/
,-rw-r--r-- 1 napst 197609 115 Jul 1 12:01 .gitconfig
◉ Config commands.
Answer: User name:
git config --global user.name "Napster"
User email:
git config --global user.email ""
View config file:
git config --list
git config user.name
git config user.email
Text editor:
git config --global core.editor "notepad++"
,Use colour in command line:
git config --global color.ui true
◉ Directory commands.
Answer: >> Change directory cd ~
cd Desktop/Git_project
>> Show user directory dir
◉ Help command.
Answer: git help
◉ Initialise command.
Answer: >> Set up folder where Git files are located
C:/Users/napst/Desktop/Git_project
>> Git init
, $ git init
Initialized empty Git repository in
C:/Users/napst/Desktop/Git_project/.git/
◉ Show hidden files ( .git etc.).
Answer: >> View files in Git_project
$ dir -la
total 8
drwxr-xr-x 1 napst 197609 0 Jun 30 13:59 .
drwxr-xr-x 1 napst 197609 0 Jun 30 12:36 ..
drwxr-xr-x 1 napst 197609 0 Jun 30 13:58 .git
>> View files in .git
$ dir -la .git
total 11
drwxr-xr-x 1 napst 197609 0 Jun 30 13:58 .
drwxr-xr-x 1 napst 197609 0 Jun 30 13:59 ..
-rw-r--r-- 1 napst 197609 130 Jun 30 13:58 config
COMPREHENSIVE QUESTIONS AND
SOLUTIONS
◉ Location of .gitconfig file.
Answer: $ pwd
/c/Users/napst
napst@DESKTOP-7Q12MG7 MINGW64 ~
$ ls -la
total 90897
drwxr-xr-x 1 napst 197609 0 Jul 1 12:01 ./
drwxr-xr-x 1 napst 197609 0 May 21 01:28 ../
...
drwxr-xr-x 1 napst 197609 0 Mar 29 22:03 .continuum/
drwxr-xr-x 1 napst 197609 0 Jun 25 19:58 .dotnet/
,-rw-r--r-- 1 napst 197609 115 Jul 1 12:01 .gitconfig
◉ Config commands.
Answer: User name:
git config --global user.name "Napster"
User email:
git config --global user.email ""
View config file:
git config --list
git config user.name
git config user.email
Text editor:
git config --global core.editor "notepad++"
,Use colour in command line:
git config --global color.ui true
◉ Directory commands.
Answer: >> Change directory cd ~
cd Desktop/Git_project
>> Show user directory dir
◉ Help command.
Answer: git help
◉ Initialise command.
Answer: >> Set up folder where Git files are located
C:/Users/napst/Desktop/Git_project
>> Git init
, $ git init
Initialized empty Git repository in
C:/Users/napst/Desktop/Git_project/.git/
◉ Show hidden files ( .git etc.).
Answer: >> View files in Git_project
$ dir -la
total 8
drwxr-xr-x 1 napst 197609 0 Jun 30 13:59 .
drwxr-xr-x 1 napst 197609 0 Jun 30 12:36 ..
drwxr-xr-x 1 napst 197609 0 Jun 30 13:58 .git
>> View files in .git
$ dir -la .git
total 11
drwxr-xr-x 1 napst 197609 0 Jun 30 13:58 .
drwxr-xr-x 1 napst 197609 0 Jun 30 13:59 ..
-rw-r--r-- 1 napst 197609 130 Jun 30 13:58 config