@Anthony_Albertorio_NEVER_ASKS_FOR_COIN
@Edward Amor
pwd
- print working directory - show your current absolute directory path
ls
- list documents in directory
ls -a
- list ALL including hidden ones (like .gitignore or .env)
cd
- go directly to computer’s root
cd ./
- stay in same directory
cd ../
- go up one directory
cd ../../
- go up two directories. Note continue to add ../
to go up 1 directory
touch <FILENAME>
- create a new file
rm <FILENAME>
- remove file. Note: file is immediately deleted and does not go to trash bin
mkdir <NAME>
- create a new directory
mv <FILENAME> <NEW DIRECTORY>
- move file to new directory
mv <OLD FILENAME> <NEW FILENAME>
- rename file
rmdir <NAME>
- remove an empty directory
DO IT VIA GUI to avoid costly mistakes - remove non-empty directory
cat <FILENAME>
- display file in terminalman <COMMAND>
- see the command’s manualq
- exit program - like man or catgit status
- Show the working tree status
git log
- show the current HEAD and its ancestry
git log --pretty=format:"%h %s" --graph
- show the current HEAD and its ancestry with formatting
git reflog
- show an ordered list of the commits that HEAD has pointed to (a local undo history for your repo - reference)
git branch -a
- show all branches
git remote -v
- list remote repositories
git diff
- show line-by-line changes in your branch compared to master
git checkout -b <branch>
- Create new branch to make changes
git checkout <branch>
- Checkout branch to make changes
git mv <old-file> <new-file>
- Change file name
git rm <file>
- Delete file
atom <filename>
(or text editor of your choice) - Make changes to the file
git add <filename>
- Add a single file with changes
git add -A
- Add all files with changes
git commit -m "Commit Message"
- Commit the change with a message
git commit -am "Commit Message"
- Add all files and commit the change in one command
git commit --amend
- Modify last commit message
git push origin
- Push change to repository (on Github)
git remote add upstream <clone-link>
- Setting an upstream repository
git checkout master
- Check out the master branch
git fetch upstream <branch>
- Fetch branch from the upstream repository
git rebase upstream/<branch>
- Rebase changes from the upstream repository
git push origin
- Push changes to the origin repository
git push origin -d <branch>
- Delete the branch from origin
git branch -d <branch>
- Delete the branch from local
Full list of yarn commands Full list of npm commands
yarn install
npm i
yarn add <package-name>
npm install <package-name>
yarn remove <package-name>
npm uninstall <package-name>
yarn init
npm init
yarn upgrade <package-name>@<verision>
npm update <package-name>@<verision>
The Bash based terminal already comes pre-installed with UNIX based systems like macOS and Linux, so there is nothing to set up.
TBD
Terminal
Place the terminal link where you find best to access.
TBD
Git Resources
rebase
as an alternative to merge
rebase
rebase
⚠️ 👀 WARNING: You should use rebase only for squashing YOUR local commits prior to a pull request. DO NOT ever rebase commits that have already been published to master. This will rewrite our public project’s history. This applies to maintainers of the project.
Github Workflow Resources