Repo Imp Commands

repo forall is a command provided by the Repo tool used to manage multiple Git repositories (as Android source code is split across many repos).

  • It executes a given shell command in each Git repository managed by repo.

📘 Syntax:

repo forall [project-list] -c [command]
repo forall -c 'git status --short' | grep -v "^$"

This command is used in a repo-managed Android source code environment to show a concise list of modified files across all git repositories, excluding empty lines. Here’s a detailed explanation:


Symbol
Meaning

??

Untracked file

M

Modified in the working directory

M

Modified in the index (staged)

A

Added to index

D

Deleted from index

D

Deleted from working directory

Task
Command

See changes in file

git diff path/to/file

See all changes

git diff

Restore modified file

git restore path/to/file

Restore all modified files

git restore .

See untracked files

git status

Delete untracked files

git clean -f

Delete untracked files & folders

git clean -fd


repo list | grep "java-middleware"

this command finds the absolute path of changed file.

Last updated