Recommend a --prune while git fetching

Especially with the main gitlab repository, there tends to be tons of
stray branches, a continue `git fetch` without any -p will easily lead
to hundreds of "orphaned branches" in the local checkouts.

Signed-off-by: Mattia Rizzolo <mattia@mapreri.org>
This commit is contained in:
Mattia Rizzolo 2018-03-29 14:28:38 +02:00
parent 1d7ca03390
commit 8426c04eeb
No known key found for this signature in database
GPG key ID: 0816B9E18C762BAD

View file

@ -103,7 +103,7 @@ rm go1.8.3.linux-amd64.tar.gz
```bash
cd /home/git/gitlab
sudo -u git -H git fetch --all
sudo -u git -H git fetch --all --prune
sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically
sudo -u git -H git checkout -- locale
```
@ -131,7 +131,7 @@ sudo -u git -H git checkout 10-6-stable-ee
```bash
cd /home/git/gitlab-shell
sudo -u git -H git fetch --all --tags
sudo -u git -H git fetch --all --tags --prune
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_SHELL_VERSION)
sudo -u git -H bin/compile
```
@ -146,7 +146,7 @@ If you are not using Linux you may have to run `gmake` instead of
```bash
cd /home/git/gitlab-workhorse
sudo -u git -H git fetch --all --tags
sudo -u git -H git fetch --all --tags --prune
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_WORKHORSE_VERSION)
sudo -u git -H make
```
@ -182,7 +182,7 @@ sudo -u git -H sed -i.pre-10.1 's/\[\[storages\]\]/[[storage]]/' /home/git/gital
```shell
cd /home/git/gitaly
sudo -u git -H git fetch --all --tags
sudo -u git -H git fetch --all --tags --prune
sudo -u git -H git checkout v$(</home/git/gitlab/GITALY_SERVER_VERSION)
sudo -u git -H make
```