11/22/2017 - 4:54 AM

Basic commands

# Starting New project in git
  git init
  git add
  git commit -m "first commit"
  git remote add origin
  git push -u origin master

# git commands
	git clone <url>
	git pull origin <branch>					
  git diff 	<file>		
	git status							
	git add src/	or git add -A				
	git config --global "" 	
 	git commit -m'company page'					
	git stash							
	git stash apply							
	git checkout <path>						
	git checkout -b Temp  					
	git checkout Temp    						

# Copy file to server machine
  scp <file> <username>@<IP address or hostname>:<Destination>

# Copy file in local
  scp <file> <user@host:~/>
# Pm2 start with custom name
  pm2 start npm --name 'APpnAme' -- start
# compress file
  zip -r folder_to_compress
# Extract files
# Change enviurnment 
 export NODE_ENV=development

# Check env
echo $NODE_ENV

# Check email with repo
git remote -v

# Change email
git remote set-url origin

# Executive Summary
$ git push -d <remote_name> <branch_name>
$ git branch -d <branch_name>
Note that in most cases the remote name is origin.

# Delete Local Branch
To delete the local branch use one of the following:

$ git branch -d branch_name
$ git branch -D branch_name