book-git-commands/src/configuration/repository.md

36 lines
790 B
Markdown

# Repository information
```bash
# List config details, including remotes, for the current repo.
git config --local -l
# List all configuration settings for the current repository, including global and system.
git config -l
# Change remote origin URL (repo name change or move).
git remote set-url origin _.git
# See what remotes are setup on a repo.
git remote -v
# See more information about remotes (origin in this case).
git remote show origin
# Delete a named remote.
git remote rm _
# List all local branches.
git branch --list
# List all branches, including remotes.
git branch -a
# List all branches merged into master (for cleanup).
git branch --merged
# List database information, include size (size-pack = kb).
git count-objects -v
# Runs database clean-up.
git gc
```