git initInitialize a new repository.
Personal dev command flow
43 commands from your notes
git initInitialize a new repository.
git clone <url>Copy an existing repository.
git clone https://github.com/user/repo.git
.gitignoreIgnore files and folders such as node_modules or .env.
node_modules/, .env
git statusShow repository status.
git status --shortShow a compact, script-friendly summary of staged, modified, and untracked files.
git add <file>Stage one or more files.
git add index.js / git add .
git commit -m "msg"Save staged changes.
git commit -m "Init project"
git diffShow file differences.
git diff / git diff --staged
git diff --statSummarize changed files and show how many lines were added or removed without printing the full diff.
git diff -- . ":(exclude)package-lock.json"Show the working-tree diff for the current path while excluding package-lock.json.
git commit --amendModify the most recent commit message or contents.
git commit --amend --no-editAdd staged changes to the last commit without changing its message.
git branchList branches.
git branch --show-currentPrint only the name of the currently checked-out branch.
git branch <name>Create a branch.
git branch feature-x
git checkout <branch>Switch to another branch.
git checkout main
git merge <branch>Merge a branch into the current branch.
git merge feature-x
git rebase <branch>Reapply commits on another base.
git rebase main
git branch -d <branch>Delete a local branch only if it is fully merged.
git branch -d feature/login
git push origin --delete <branch>Remove a branch from the remote repository.
git push origin --delete feature/login
git branch -D <branch>Delete a local branch even if it is not merged.
git branch -D feature/login
git push origin :<branch>Force-delete a remote branch.
git push origin :feature/login
git remote add <name> <url>Link the repository to a remote.
git remote add origin https://github.com/user/repo.git
git push <remote> <branch>Upload commits to a remote branch.
git push origin main
git push origin v0.10.0Push a local version tag to origin after creating it with git tag.
git tag v0.10.0
git pull <remote> <branch>Fetch and merge from a remote branch.
git pull origin main
git fetchDownload remote changes without merging.
git fetch origin
git diff main origin/mainCompare local main with the remote main branch after fetching.
git reset --soft HEAD~1Undo the last commit but keep all changes staged.
git reset --hard HEAD~1Undo a commit and discard changes.
git revert <commit>Create a new commit that reverses another commit.
git revert a1b2c3d
git restore <file>Discard local file changes.
git restore index.js
git rm <file>Remove a file and stage the deletion.
git rm old.txt
git clean -fRemove untracked files.
git commit --amendFix or update the most recent commit.
git logView commit history.
git log --oneline
git log --onelineShow a compact one-line commit log.
git log --graphShow the branch graph.
git log --graph --decorate
git statusView staged and unstaged files.
git show <commit>Show commit details.
git show a1b2c3d
git blame <file>Show who changed each line.
git blame index.js
git rm --cached <file>Stop tracking a file while keeping it on disk.
echo <file> >> .gitignore echo secrets.env >> .gitignore
git status
git add .
git commit -m "message"
git push origin mainMost common daily workflow.
27 commands from your notes
Use when dependencies are stale, native files changed, or release builds behave strangely.
rm -rf node_modules package-lock.jsonRemove old dependencies and the npm lock file.
npx expo prebuild --platform android --cleanRegenerate native Android files from Expo config.
cd androidMove into the Android project before Gradle commands.
./gradlew cleanClear stale Gradle build outputs.
./gradlew assembleReleaseBuild the release APK.
npx expo init <project>Create a new Expo project.
npx expo ejectEject the project to the bare workflow.
npx expo prebuildGenerate native Android and iOS projects from package.json and app config.
npx expo doctorCheck the project for issues.
npx expo install <package>Install an Expo-compatible package version.
rm -rf node_modules package-lock.jsonRemove old dependencies and the npm lock file before a fresh install.
app.jsonStatic JSON config with fixed values; good for simple Expo configs.
app.config.jsJavaScript config that can compute values, read env variables, and change by platform.
EXPO_PUBLIC_FIREBASE_API_KEY=xxxxExpose safe public values to Expo through environment variables.
const firebaseConfig = { apiKey: process.env.EXPO_PUBLIC_FIREBASE_API_KEY, };
npx expo startStart the Metro bundler development server.
npx expo start --dev-clientStart Metro for a custom development client.
npx expo run:androidBuild and run on an Android device or emulator.
npx expo run:android --variant releaseCreate a local production Android build without Metro.
npx expo run:iosBuild and run on an iOS simulator or device.
npx eas build --platform androidBuild an APK or AAB using EAS.
npx eas build --platform iosBuild an IPA using EAS.
npx eas submit --platform androidSubmit an Android build to the Play Store.
npx eas submit --platform iosSubmit an iOS build to the App Store.
npx expo prebuild --platform android --cleanRegenerate the Android native project from Expo config.
npx expo prebuild --cleanRebuild native projects from scratch.
npx expo exportExport a production bundle.
npx expo publishPublish a JavaScript bundle over the air.
npx expo optimizeOptimize images in the project.
npx expo configShow the Expo config.
npx expo whoamiShow the logged-in Expo user.
npx expo logout / npx expo loginManage the Expo account session.
npx expo upgradeUpgrade the Expo SDK.
26 commands from your notes
./gradlew tasksList all available Gradle tasks.
./gradlew propertiesShow project properties.
./gradlew dependenciesShow the dependency tree.
./gradlew assembleDebugBuild a debug APK.
./gradlew assembleReleaseBuild a release APK.
./gradlew buildRun a full build for debug and release outputs.
./gradlew cleanClean build outputs.
./gradlew cleanBuildCacheClear the Gradle build cache.
cd android & gradlew assembleReleaseWindows command prompt shortcut for building the release APK from the project root.
cd android && ./gradlew assembleRelease --no-daemonLinux shell command for building release APK without a Gradle daemon.
./gradlew installDebugInstall the debug APK on a connected device.
./gradlew installReleaseInstall the release APK on a connected device.
./gradlew runRun the project when the setup supports it.
./gradlew testRun unit tests.
./gradlew connectedAndroidTestRun instrumented tests on a connected device or emulator.
./gradlew externalNativeBuildDebugBuild native libraries for debug.
./gradlew externalNativeBuildReleaseBuild native libraries for release.
./gradlew cleanExternalNativeBuildClean native build outputs when supported by the setup.
./gradlew build --stacktraceShow detailed stack traces for build failures.
ps aux | grep gradleFind running Gradle processes on Linux.
kill -9 <gradle_process_id>Force-stop a stuck Gradle process.
./gradlew build --infoShow verbose build output.
./gradlew build --debugShow full debug logs with very detailed build output.
./gradlew build --warning-mode allShow all Gradle warnings.
--warning-mode summary | all | none | failAvailable Gradle warning modes; summary is the default.
org.gradle.warning.mode=allPersist full Gradle warnings in android/gradle.properties.
X:/projectDir/android/gradle.properties
22 commands from your notes
adb devices -lList connected devices with details.
adb connect <IP>:5555Connect to a device over Wi-Fi after USB setup.
adb connect 192.168.1.10:5555
adb forward tcp:<LP> tcp:<DP>Redirect a port from the PC to the device for network traffic.
adb forward tcp:8081 tcp:8081
adb reboot [mode]Reboot the device; use bootloader or recovery for modes.
adb reboot recovery
adb install -r <path/to/app.apk>Reinstall an app while keeping existing data.
adb install -r latest.apk
adb uninstall -k <package.name>Uninstall an app while keeping app data and cache.
adb uninstall -k com.myapp
adb shell pm clear <package.name>Delete all app data like Clear Storage.
adb shell pm clear com.myapp
adb shell pm grant <package> <perm>Grant a runtime permission instantly.
adb shell pm grant com.myapp CAMERA
adb shell pm disable-user --user 0 <pkg>Disable a system app for the current user.
adb shell pm disable-user --user 0 com.bixby
adb logcat -cClear the entire log buffer.
adb logcat -c
adb logcat -v colorDisplay logs in colorized format.
adb logcat -v color
adb logcat *:EFilter for all errors and crashes.
adb logcat *:E
adb logcat -b crash -dDump the dedicated crash buffer and exit.
adb logcat -b crash -d
adb logcat "TAG:I *:S"Isolate a specific tag and silence all others.
adb logcat "RNJS:I *:S"
adb shellOpen an interactive terminal on the device.
adb shell
adb shell dumpsys activity topFind the package name of the foreground app.
adb shell dumpsys activity top
adb shell am start -n <pkg/.Activity>Launch a specific activity or app component.
adb shell am start -n com.myapp/.HomeActivity
adb shell input keyevent 3Simulate a key press; 3 is HOME and 4 is BACK.
adb shell input keyevent 3
adb shell input text "hi"Send simulated text input to the focused field.
adb shell input text "TestMessage"
adb shell settings put global <key> <val>Modify system settings, such as disabling animations.
adb shell settings put global window_animation_scale 0.0
adb shell screenrecord /sdcard/v.mp4Record screen video; use Ctrl+C to stop.
adb shell screenrecord /sdcard/demo.mp4
adb shell screencap -p > file.pngTake a screenshot and save it directly to the PC.
adb shell screencap -p > capture.png
45 commands from your notes
sudo parted /dev/nvme0n1Open parted to inspect the target NVMe disk.
print freeShow free space from inside parted.
lsblkShow block devices and partition layout.
free -hShow RAM usage in a human-readable format.
sudo fdisk -l /dev/nvme0n1List partitions on the NVMe disk.
df -h /bootCheck /boot disk usage.
parted / cfdiskUse parted for disk inspection and cfdisk for interactive partition creation.
/etc/default/grubMain GRUB configuration file.
grub-mkconfig -o /boot/grub/grub.cfgGenerate GRUB configuration after making sure /boot is mounted.
rebootRestart the system after bootloader or system changes.
/etc/grub.d/40_customFile used for custom GRUB entries.
localectl set-keymap trqSet the console keyboard layout to Turkish Q.
sudo pacman -SyuSynchronize package databases and upgrade all installed packages.
AUR helpers: yay / paruUse AUR helpers for packages not available in official repositories.
git clone https://aur.archlinux.org/yay.gitClone the YAY AUR helper source.
cd yayEnter the cloned YAY directory.
makepkg -siBuild and install YAY from the package source.
yay -SyuUpdate the system through YAY.
yay -S zenExample AUR package installation for Zen Browser.
sudo pacman -S pacman-contribInstall pacman cache management tools.
sudo paccache -rClean old pacman package cache entries.
sudo paccache -rk1Keep one cached version while cleaning pacman cache.
sudo paccache -r -k0Remove all cached pacman package versions.
yay -SccClean YAY cache.
~/.bashrcRuns for every interactive shell; useful for aliases, functions, and shell behavior.
~/.bash_profileRuns once at login; useful for environment variables and usually sources ~/.bashrc.
source ~/.bash_profileApply shell profile changes without logging out.
export ...Export commands are temporary unless added to .bashrc or .bash_profile.
~/.xinitrcRuns before X11 starts when using startx.
#!/bin/bash
export XDG_SESSION_TYPE=x11
export DESKTOP_SESSION=xfce
export XDG_CURRENT_DESKTOP=XFCE
exec startxfce4Example ~/.xinitrc for starting XFCE in an X11 session.
startxStart the X11 session manually.
XorgDisplay server handling graphics and input.
X11Display protocol used by Xorg; defines communication between apps and the display server.
WaylandModern alternative to X11/Xorg.
LightDM GreeterProvides a graphical login screen and can automatically start X sessions.
https://jdk.java.net/archiveOpenJDK archive source; OpenJDK 17 is recommended for React Native Expo development.
sudo pacman -S jdk17-openjdkInstall OpenJDK 17 via pacman.
curl -fsSL https://fnm.vercel.app/install | bashInstall Fast Node Manager; install unzip first if setup fails.
fnm ls-remoteList available Node.js versions.
fnm install --ltsInstall the latest Node.js LTS version.
fnm install 17Install a specific Node.js major version when needed.
fnm install v8.3.1Install a specific full Node.js version.
export ANDROID_EMULATOR_HOME="$HOME/.config/.android"Set the Android Emulator home directory.
sudo pacman -S libbsdInstall libbsd if the Android Emulator setup needs it.
AVD Settings -> Disable Auto-Save (Snapshot)Disable the AVD snapshot auto-save feature if it causes emulator issues.
4 commands from your notes
echo $SHELLDisplay the user's default shell.
echo $0Display the currently running shell.
echo "$$"Display the current shell process ID.
ps -p "$$"Display the application running as the current shell process.
10 commands from your notes
cd hashcatMove into the Hashcat working directory.
echo "ffddccddaa" > filter.txtWrite the target BSSID to the filter file without separators.
hcxdumptool -o hash -i wlan0mon --filterlist=filter.txt --filtermode=2 --enable_status=1 -c xCapture PMKID data from an authorized target on the selected channel.
hcxpcaptool -z hashtocrack hashConvert the capture into a legacy Hashcat-compatible PMKID file.
hashcat64.exe -m 16800 hashtocrack -a 3 -w 3 ?l?l?l?l?lim123 --forceTest five lowercase characters followed by the fixed suffix im123.
hashcat64.exe -m 16800 hashtocrack -a 3 -w 3 ?l?l?d?d?d?d?d?dTest a mask containing two lowercase letters and six digits.
hashcat64.exe -m 16800 -w 3 hashtocrack -a 0 "xx.txt"Test the PMKID hash with a wordlist.
apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev libpcap-devInstall the build dependencies required by hcxtools.
make && make installBuild hcxtools from source and install it.
hashcat64.exe -m 2500 -w 4 WIFIPASS.hccapx -a 0 "D:\Wordlist\345-12345.txt"Test a legacy WPA/WPA2 hccapx capture with a wordlist.
32 commands from your notes
eth.addr == 54:2e:6b:ce:fc:bbMatch a source or destination Ethernet MAC address.
eth.src == 54:2e:6b:ce:fc:bbMatch a source Ethernet MAC address.
eth.dst == 54:2e:6b:ce:fc:bbMatch a destination Ethernet MAC address.
vlan.id == 16Match a VLAN ID.
arp.dst.hw_mac == 54:2e:6b:ce:fc:bbMatch the target MAC address in ARP.
arp.dst.proto_ipv4 == 10.10.10.10Match the target IPv4 address in ARP.
arp.src.hw_mac == 00:1a:6b:ce:fc:bbMatch the sender MAC address in ARP.
arp.src.proto_ipv4 == 10.10.10.10Match the sender IPv4 address in ARP.
ip.addr == 10.10.10.10Match a source or destination IPv4 address.
ip.dst == 10.10.10.10Match a destination IPv4 address.
ip.src == 10.10.10.10Match a source IPv4 address.
icmp.type == 8Match an ICMP type; type 8 is an echo request.
tcp.port == 20Match a source or destination TCP port.
tcp.dstport == 80Match a destination TCP port.
tcp.srcport == 60234Match a source TCP port.
udp.port == 513Match a source or destination UDP port.
udp.dstport == 513Match a destination UDP port.
udp.srcport == 40000Match a source UDP port.
tcp.flags.reset == 1Show TCP packets with the reset flag set.
tcp contains kywrdShow TCP packets containing the specified keyword or byte sequence.
http.requestShow all HTTP requests.
vtp.vlan_info.vlan_name == TESTMatch a VLAN name advertised by VTP.
bgp.originator_id == 192.168.1.1Match a BGP originator ID.
bgp.next_hop == 192.168.1.1Match a BGP next-hop IPv4 address.
rip.ip == 200.0.2.0Match an IPv4 address advertised by RIP.
ospf.advrouter == 192.168.170.8Match an OSPF advertising router ID.
eigrp.as == 100Match an EIGRP autonomous system number.
hsrp.virt_ip == 192.168.23.250Match an HSRP virtual IPv4 address.
vrrp.ip_addr == 192.168.23.250Match a VRRP virtual IPv4 address.
zebra.dest4 == 10.10.10.10Match a ZEBRA destination IPv4 address.
wlan.addr == 54:2e:6b:ce:fc:bbMatch a source or destination wireless MAC address.
wlan.sa == 54:2e:6b:ce:fc:bbMatch a wireless source MAC address.
13 commands from your notes
git tag v1.0.3Create a local version tag.
git push origin v1.0.3Push a version tag to the remote repository.
git push v1.0.3Push a tag using the configured default remote.
gh release upload v1.0.0 android/app/build/outputs/apk/release/app-release.apkUpload an APK asset to an existing GitHub release.
gh release create v1.0.0 android/app/build/outputs/apk/release/app-release.apkCreate a GitHub release with an APK asset.
gh release create v1.0.0 \
android/app/build/outputs/apk/release/app-release.apk \
--title "v1.0.0" \
--notes "Production release"Detailed GitHub release creation command with title and notes.
gh release listList GitHub releases.
gh issue listList GitHub issues.
gh release delete v1.0.5 -yDelete a GitHub release without an interactive confirmation.
git tagList local tags.
git ls-remote --tags originList remote tags from origin.
git tag -d <tag_name>Delete a local tag.
git push --delete origin <tag_name>Delete a remote tag after deleting it locally if needed.
git tag -d <tag_name>