Posts

Showing posts from December, 2019

GIT

1. [Setup] Git Clone git clone [url] [folder-name] example : git clone https://{user}@xxx.git {folder} 2. Fetch & checkout git fetch && git checkout [branchname] example: /home/react/dev/api> git fetch && git checkout develop /home/react/dev/api> git fetch && git checkout master 3. Pull git pull 4. Check Current Branch git rev-parse --abbrev-ref HEAD 5. Discard change git clean -df git checkout – . *Before code changed run : service supervisord restart Reference : [1] https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html [2] https://www.atlassian.com/git/tutorials/syncing How to remove the last commit git reset --hard HEAD^ git push origin HEAD --force https://sethrobertson.github.io/GitFixUm/fixup.html

How to install/uninstall/update node / angular / npm

Image
INSTALL How to install Node.js to latest version Windows Install the latest,  https://nodejs.org/en/download CentOS Change setup_10.x to whatever version you need. - curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash - -  sudo yum install nodejs UPDATE How to update Node.js to latest version 1. Uninstall Node.js. Click the Start menu, type "Change or Remove a Program", click on the item shown, find Node.js in the list and uninstall it. 2. Delete directories, both C:\Program Files (x86)\nodejs\ and C:\Program Files\nodejs\ if they exist. 3. Install the latest, https://nodejs.org/en/download The uninstall/delete/install seems unnecessary, but it often is and this will save your time. These instructions come from Microsoft. How to Update NPM: https://www.npmjs.com/package/npm-windows-upgrade UNINSTALL How to Uninstall Node and NPM You uninstall Node.js and NPM the same as you would most all Windows software: Open the Windows Con...