Node is a server runtime built around the chrome V8 engine for javascript. Node will take care of everything that needs to happen on the server. Together with node comes 'npm' with stands for node package manager. It will take care of all the modules which the projects depend on. A module is a bundle of function and objects we can use in our code. How to download node:
node -v
in the terminalcmd
on your computerdir
to list the files and subdirectories in your current directorycd <directory name>
to navigate to subdirectory. Use cd ..
to navigate back to parent directory.mkdir <directory name>
to create a new directoryGo to https://git-scm.com/download/ and download 64-bit version for your system
git init
initializes the new repositorygit clone <repository url>
git remote add origin <repository url>
stores the url to the remote repository in a variable named origingit add .
for all staging all filesgit add <file name> <file name>
for staging specific file. Requires minimum one filename but can take in multiple filenames seperated by whitespacegit commit -m "<commit message>"
the commit message should briefly describe the changes you have made to the branchgit push origin <branch name>
for pushing the commited code to the remote github repositorygit pull origin <branch name>
To pull the changes from the remote repositoryThe changes you make to the project should not be commited to the local or remote master branch, but rather a temporary branch containing the changes you made. This is to avoid problems regarding two people making changes to the same file.
git branch
to view a list over the local branches and the current active branch
git branch <new branch name>
to create a new branch
git checkout <branch name>
to switch to a specific branch
git checkout -b <new branch name>
to both create a new branch and switch to it
Make sure to always push to specific branch. If no branch is specified, then the changes may be pushed to the master branch, overriding the content there. Always use git push origin <branch name>
After making a new branch and checking out to it, you can stage and commit as usual
git branch -d <local branch name>
to delete a branch locally
git push origin --delete <remote branch name>
to delete a branch remotely
git branch -m <new name>
to rename the local branch
git push origin -u <new_name>
to push the repository with the new name to the remote repository
git push origin --delete <old_name>
to delete the remote branch with the old name
-f
flag (f stands for force) to execute the command despite the errorgit clone https://github.com/sigrikd/CIBUS.git
npm i
or npm install
npm run dev
localhost:3000
in the search bar in your browser