Change directory
cd <folder>Move into another folder. Use .. to go up one level.
Examples
cd my-first-appcd ..Up one folder
Common mistakes
- Folder names with spaces need quotes, e.g. cd "Mobile Development"
Command handbook
Terminal, Git, packages, Android, iOS, builds and debugging. Search, filter by category, and copy with one click.
cd <folder>Move into another folder. Use .. to go up one level.
Examples
cd my-first-appcd ..Up one folder
Common mistakes
lsShow the files and folders in the current directory.
Examples
ls -laInclude hidden files like .gitignore (macOS / Linux / Git Bash)
dirWindows Command Prompt equivalent
pwdShow the full path of the folder you are currently in.
mkdir <folder-name>Make a new directory.
Examples
mkdir -p mobile-dev/labsCreate nested folders at once
code .Open the current folder in VS Code.
Common mistakes
code --install-extension <extension-id>Install an editor extension from the terminal.
Examples
code --install-extension dbaeumer.vscode-eslintcode --install-extension usernamehw.errorlensgit clone <repository-url>Download a copy of a remote repository, including its full history.
Examples
git clone https://github.com/<username>/mobile-dev-labs.gitgit clone <repository-url> my-folderClone into a folder with a different name
Common mistakes
git statusSee which files changed, which are staged and which branch you are on.
git initTurn the current folder into a Git repository. Only needed if git status says "not a git repository".
Common mistakes
git config --global user.name "<Your Name>"Tell Git who you are. Every commit is labelled with this name and email.
Examples
git config --global user.email "<you@bue.edu.eg>"Use the email of your GitHub account
git add <file>Choose which changes go into the next commit.
Examples
git add .Stage everything in the current folder
git add App.tsx components/Common mistakes
git commit -m "<message>"Save a snapshot of staged changes with a message.
Examples
git commit -m "Add task list screen"git pushUpload your local commits to GitHub.
Examples
git push -u origin mainFirst push of a new branch
Common mistakes
git branch -M mainMake sure your first branch is called main before the first push.
git remote add origin <repository-url>Connect your local repository to the empty repo you created on GitHub.
Examples
git remote -vCheck which URL origin points to
git remote set-url origin <repository-url>Fix a wrong URL
Common mistakes
git pullDownload and merge commits from the remote branch.
Examples
git pull --rebase origin maingit switch -c <branch-name>Start a new branch for a feature or lab without touching main.
Examples
git switch mainGo back to main
git branchList branches
git branchShow local branches. The * marks the one you're on — check it before every commit.
Examples
git branch -aInclude remote branches
git switch <branch-name>Move to an existing branch.
Examples
git switch mainCommon mistakes
git merge <branch-name>Bring the commits from another branch into the branch you're on (usually main).
Examples
git switch main && git pull && git merge aliCommon mistakes
git branch firstgit log --oneline --graph --allCompact, visual list of commits on every branch — see who merged what.
git restore <file>Throw away uncommitted changes to a file and return it to the last commit.
Common mistakes
gh repo create <name> --public --source=. --pushUsing the GitHub CLI, create a remote repository and push your current project in one step.
gh auth loginAuthenticate the GitHub CLI with your account through the browser.
gh pr create --fillOpen a Pull Request from your current branch to main. On the website, use the Compare & pull request button instead.
npm installInstall every package listed in package.json into node_modules.
Examples
npm install <package-name>npm ciClean install exactly from package-lock.json
Common mistakes
npm install -D <package-name>Install a tool the project needs only during development (linters, test tools).
npx <package>npx = Node Package eXecute. It runs a package's command without installing it globally. npm installs, npx runs.
Examples
npx -vCheck npx is available
npx create-expo-app@latest my-appnpm run <script>Run a script defined in the "scripts" section of package.json.
Examples
npm run androidnode -vPrint the installed Node.js version — the first thing to check when tooling misbehaves.
Examples
npm -vnpx create-expo-app@latest <app-name>Scaffold a new mobile project from the official template.
Examples
npx create-expo-app@latest my-first-appnpm run reset-projectClear the demo screens from a new Expo app and leave a blank app/index.tsx. Answer Y to keep the old files in app-example/.
Common mistakes
npx expo startStart Metro and show a QR code to open the app on a device.
Examples
npx expo start --tunnelUse when phone and laptop are on different networks
npx expo start -cClear the bundler cache
Common mistakes
npx expo install <package>Install a library at the version that matches your SDK.
npx expo-doctorCheck the project for version mismatches and common configuration issues.
npx expo install --fixUpdate installed packages to the versions your Expo SDK expects. Run it after expo-doctor reports a mismatch.
npx expo --versionPrint the Expo CLI version. Useful when Expo Go says the project is incompatible.
npx expo install nativewindInstall NativeWind (Tailwind classes for React Native). Then follow the official setup guide for the version installed.
adb devicesShow emulators and USB devices visible to the Android Debug Bridge.
Common mistakes
adb logcat *:EStream device logs, filtered to errors only.
emulator -list-avdsPrint the names of every Android Virtual Device you created.
Examples
emulator -avd <avd-name>Boot one from the terminal
xcrun simctl list devicesShow available iOS simulators and their state (macOS only).
eas build --platform android --profile previewCreate an APK/AAB in the cloud that you can install or share.
cd android && ./gradlew cleanRemove cached native build output when builds fail for no clear reason.
Examples
cd android && gradlew.bat cleanWindows
npx kill-port 8081Stop whatever process is holding the Metro bundler port.
npx expo start --clearFix stale or strange bundling errors by resetting the cache.
curl -i <api-url>Send a GET request and print the status, headers and body.
Examples
curl -i https://jsonplaceholder.typicode.com/todos/1ipconfigShow your computer's network addresses — needed when a phone must reach a local server.
Examples
ifconfig | grep inetmacOS / Linux
Ctrl + CStop the dev server or any command running in the terminal.
↑ / ↓Cycle through previously typed commands in the terminal.
Ctrl + `Toggle the integrated terminal in VS Code (Cmd + ` on macOS).
Ctrl + C · a · r · jWhile npx expo start is running — a opens Android, r reloads, j opens the debugger, Ctrl + C stops.
Ctrl + Shift + POpen VS Code's command palette (Cmd + Shift + P on macOS).
No command matches that search. Try a shorter word, or clear the category filter.