# This clones from remote to local in directory named 'Repository'
git clone https://github.com/UserName/Repository.git
# This clones from remote to local in current directory
git clone https://github.com/UserName/Repository.git .
# This creates init files for git in current directory with branch named 'main'
git init --initial-branch=main
# This creates commit with staged files
git commit -m 'Commit Message'
# This edits current commit
git commit --amend
# This adds remote named 'origin' with url
git remote add origin https://github.com/UserName/Repository.git
# This sets url of remote named 'origin'
git remote set-url origin https://github.com/UserName/Repository.git
# Usage
git rebase -i HEAD~5
# This pulls from remote
# WARNING : somehow remote and local edit any same files, it occurrs conflicts
git pull
# This can pull when you commited early than remote and you want to pull
# WARNING : somehow remote and local edit any same files, it occurrs conflicts
git pull --rebase
# Creates branch named 'sub' force-fully from HEAD
git branch -f sub
# This goes in to branch named 'sub'
git checkout sub