Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/user
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-25 15:07:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-25 15:07:15 +0300
commitdf65129ab40540728d4b391fc1a21d5a1de87b9c (patch)
tree70537d61226dcb2b330e76cbdf2b3c6f77fd6c62 /doc/user
parentef62043981093451b8ad3113d57c227251646f9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user')
-rw-r--r--doc/user/project/repository/branches/index.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md
index 30ddf8d3230..2b6858ab4f7 100644
--- a/doc/user/project/repository/branches/index.md
+++ b/doc/user/project/repository/branches/index.md
@@ -389,3 +389,18 @@ To fix this problem:
Git versions [2.16.0 and later](https://github.com/git/git/commit/a625b092cc59940521789fe8a3ff69c8d6b14eb2),
prevent you from creating a branch with this name.
+
+### Find all branches you've authored
+
+To find all branches you've authored in a project, run this command in a Git repository:
+
+```shell
+git for-each-ref --format='%(refname:short) %(authoremail)' | grep $(git config --get user.email)
+```
+
+To get a total of all branches in a project, sorted by author, run this command
+in a Git repository:
+
+```shell
+git for-each-ref --format='%(authoremail)' | sort | uniq -c | sort -g
+```