go to https://git-scm.com/
download and install
git --version
git help config
git config --help
git config --global user.name "Patrick Touchette"
git config --global user.email "[email protected]"
git config --list
git init
git status
touch .gitignore
git add -A
git add .
to remove all files
git reset
to remove a specific file
git reset file.js
git commit -m "detailed message"
git init
touch .gitignore
touch readme.md
git add .
git commit -m "first commit"
git clone <url> <where to clone>
git clone ./path/to/remote/remote.git .
git remote - v
To see all the branches
git branch -a
commit changes
git diff
git status
git add -A
git commit -m "modified a function"
then push
git pull origin master
git push origin master
git branch mybranch
git checkout mybranch
to check out which branch you are in
git branch
Write code for that feature then commit
git commit .
git push -u origin mybranch
check that the branch was added to remote
git branch -a
git checkout master
git pull origin master
Check wich branches have been merged
git branch --merged
Merge the branch
git merge mybranch
Push to remote repo
git push origin master
check the branches
git branch --merged
delete branch locally
git branch -d mybranch
git branch -a
delete branch from the remote
git push origin --delete mybranch