Useful Commands

Afzal Zubair
1 min readSep 14, 2020


npm i create-react-app -g
npm i create-next-app -g
npm i create-next-app -g
npm i create-react-app -g
npm list -g — depth 0

Git Commands

git init
git remote add {name-of-remote-repo} <URL-of-remote-repo>
Example: git remote add origin
git add —all
git commit -m ‘Commit message’
git pull {name-of-remote-repo} {branch-name}
Example: git pull origin master
git push [-u] {name-of-remote-repo} {branch-name}
Example: git push -u origin master
git branch -a
git branch
git branch {newBranch}
git checkout {master/anyBranch}
git remote -v
git remote rm {name-of-remote-repo: example origin}
Example: git remote rm origin

For pushing to a different GitHub account from the same computer


change remote url to https:

git remote set-url origin

and you are good to go:

git push

To ensure that the commits appear as performed by USERNAME, one can setup the and for this project, too:

git config USERNAME
git config