GIT (CLI)

INSTALLATION

PS C:\> Invoke-WebRequest https://git-scm.com/downloads/win -OutFile .\Downloads\Git-2.49.0-64-bit.exe
PS C:\> .\Git-2.49.0-64-bit.exe
 * ALT: BROWSER > https://git-scm.com/downloads > 

 * Follow guided installation and stick w/ defaults
 
git:~$ git --version
 git version 2.49.0.windows.1

INITIAL CONFIGURATION & INITIALIZATION

Git will start watching the specified directory and will create a hidden folder named ".git" to keep track of changes.

git:~$ git config --list
 ...
 user.email=YOUR-EMAIL
 user.name=YOUR-NAME
git:~$ git config --global user.name {"userName"}
git:~$ git config --global user.email {"emailAddress"}

PS C:\> New-Item -Path {path}\{directoryName} -ItemType Directory
git:~$ cd {directoryName}
git:~$ git init
git:~$ git status
 On branch master
 ...

TRACK HISTORY

VIEW CHANGES

This is used to review changes made on the remote Github repository prior to modification

REVIEWING CHANGES

Compare changes between data in current working directory and the last snapshot/commit

REMOVING FILES & DIRECTORY

SYNCHRONIZATION

fetch changes from the default remote (origin) and merges them into your current local branch.

STAGE CHANGES

Staging is the process of marking the files to be committed to the repository

MARK LOCAL CHANGES FOR REMOTE UPDATE

Think of this as git creating a save point.

PUSHING CHANGES TO REMOTE DIRECTORY

RENAMING DIRECTORIES

DELETING FILES

CREATING DIRECTORIES

Last updated