Git Tutorial

git config --global user.name "Feng Wang"

git config --global user.email "fengwang2004@gmail.com"

git config --global core.editor "code --wait"

git config --global core.autocrlf ture (or input in windowns)

git config --help (git config --h)

git init

git ls-files (files in staging area)

git status -s

git add *

git restore

git rm files

git rm --cached files (only remove specific files on stage)

git mv files

git commit -am .txt (or -m -a )

create a win powershell script running for local account:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command "$env:Path = 'C:\Users\dv655c\AppData\Local\GitHubDesktop\app-3.5.2\resources\app\git\cmd;' + $env:Path"

Procedure to create a backup in github

go to the folder

git init

git add xxxx

git commit -m "first commit"

git remote add origin https://github.com/fengannarbor/books.git

git push --set-upstream books feng