Version Control

Remove node_modules folder from git repository

It's standard practice to add the node_modules directory to your .gitignore file. The list of dependencies is in the package.json file and all will be installed when you clone it and run npm install .

If you forgot to add the node_modules folder to the .gitignore file when pushing your project to github and now you want to remove it.

First add the node_modules to your .gitignore file then run the commands below

git rm -r --cached node_modules

git commit -m " removed the node_modules dir and added to .gitignore"

Tags: 

Create a branch in Git

To see a list of branches and the current branch  run 

git branch 

To list all branches including the remotes 

git branch -a

To create a new branch 

git branch my_new_branch

To change to the new branch

git checkout my_new_branch

To both create and change to the new branch in one command

git checkout -b new_test_branch

Tags: 

GitHub- Pushing a repository on Windows

This article will show you how to create a local repository(repo) on your own system and then push that on to a repository that you have set up on GitHub.com

 

Set up the installation

You can download msysgit from http://code.google.com/p/msysgit/downloads/list . Get the latest Full Installer for Official Git for Windows.

Tags: