-1

I am new to git and i want to know how to use git repo. generally developers created for use our own. jus like i want to use any node.js example code : Git Repo Link and i have clone it by git-bash also i have download the .zip file in my local computer. but dont know what is the next step to make it runnable. i want to learn from the code people done on git. i have run

npm install

and after downloading all dependencies in

node_modules

directory. but dont know what is the next process and how to analyse repo to make it work in local. please help.

Chanda Korat
  • 2,453
  • 2
  • 19
  • 23
Mani
  • 9
  • 2
  • 10
  • Your question is unclear, what do you mean by "how to analyse repo"? Anyways, the answer depends on what repo you're working on and what you're trying to accomplish. – Eduard Malakhov Apr 06 '17 at 10:36
  • Do you want to run the project cloned on your local? if yes then run `node src/server.js` and in browser go to url localhost:3000. – vartika Apr 06 '17 at 10:45
  • Thanks @vartika for the answer but i when i run `node src/server.js` it throws error import path from 'path'; ^^^^^^ – Mani Apr 06 '17 at 11:22
  • Can you tell me node version and npm version you are using? to check version run node -v & npm -v. – vartika Apr 06 '17 at 11:34
  • If `node` fails, then this is most likely not a git question. – Lasse V. Karlsen Apr 06 '17 at 11:54
  • Also be aware that the linked repoistory is outdated and its very README points you to: https://github.com/lmammino/judo-heroes-2 – k0pernikus Apr 06 '17 at 12:39
  • @vartika node -v => v6.9.5 , npm -v => v4.4.4 – Mani Apr 06 '17 at 12:39

2 Answers2

1

From the wording in your question, it sounds like you may be confused between git and npm etc.

Git is a source control tool that is able to remotely/locally sync versioned files(changes).

Take a look at the following doc to learn about setting up a new git repo locally without a remote repo setup.

https://git-scm.com/docs/git-init

NPM is a package manager for Node.JS

http://npmjs.com/


To see what others are doing with Git, go take a look at these and clone some: https://github.com/trending

AO_
  • 2,573
  • 3
  • 30
  • 31
0

please run below command

git clone https://github.com/lmammino/judo-heroes.git

After that run npm install

Sunil Prajapati
  • 330
  • 2
  • 6