Git related commands

git status

git branch
git branch -r

git add <file>
git add .

git commit -m 'commit content'

//Clone a repo into current folder
git clone [email protected]:partners/tw.git .

git push

git pull

//Discard unstaged changes
git checkout -- <file>
git checkout -- .

//Check difference between files
git diff hello.txt

//Merge from branch dev or remote branch origin/testing
git merge dev
git merge origin/testing

//Check difference between last 2 
git log -p -2

//Checkout a remote branch
git checkout --track origin/dev

//Push to remote branch
git push -u origin dev

//Set track of a local branch
git branch -u origin/dev

//Stop tracking a file
git rm --cached worker.log
git rm -r --cached path_to_your_folder/

// Show all remote URL
git remote -v

// Show files in a commit
//https://stackoverflow.com/questions/424071/how-to-list-all-the-files-in-a-commit
git show --pretty="" --name-only bd61ad98

Change Remote URL

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

Reference: https://gist.github.com/fokayx/255b228ded2bca1c4f60