2018-02-05 02:27:07 +00:00
|
|
|
# Repository information
|
2019-11-23 16:05:04 +00:00
|
|
|
```bash
|
2018-02-05 02:27:07 +00:00
|
|
|
# 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
|
|
|
|
|
2019-04-30 17:29:30 +00:00
|
|
|
# Delete a named remote.
|
|
|
|
git remote rm _
|
|
|
|
|
|
|
|
# List all local branches.
|
2018-02-05 02:27:07 +00:00
|
|
|
git branch --list
|
|
|
|
|
2019-04-30 17:29:30 +00:00
|
|
|
# List all branches, including remotes.
|
2018-02-05 02:27:07 +00:00
|
|
|
git branch -a
|
|
|
|
|
|
|
|
# List all branches merged into master (for cleanup).
|
|
|
|
git branch --merged
|
|
|
|
|
2019-04-30 17:29:30 +00:00
|
|
|
# List database information, include size (size-pack = kb).
|
2018-02-05 02:27:07 +00:00
|
|
|
git count-objects -v
|
|
|
|
|
|
|
|
# Runs database clean-up.
|
|
|
|
git gc
|
2019-11-23 16:05:04 +00:00
|
|
|
```
|