Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
cb912cf7
Verified
Commit
cb912cf7
authored
3 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
rephrase
here we explain the command we'll run on a separate line for those diagonal-readers.
parent
accbea7a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/gitlab.md
+10
-7
10 additions, 7 deletions
howto/gitlab.md
with
10 additions
and
7 deletions
howto/gitlab.md
+
10
−
7
View file @
cb912cf7
...
...
@@ -476,9 +476,10 @@ GitLab remotes, where it "un-protects" and "re-protects" the branch.
You should run the script with an account that has "Maintainer" or
"Owner" access to GitLab, so that it can do the above GitLab API
changes. You will then need to provide an
[
access token
](
https://gitlab.torproject.org/-/profile/personal_access_tokens
)
through
the
`GITLAB_PRIVATE_TOKEN`
environment variable. So, for example, this
will rename the
`master`
branch to
`main`
on the local and remote
repos:
the
`GITLAB_PRIVATE_TOKEN`
environment variable.
So, for example, this will rename the
`master`
branch to
`main`
on the
local and remote repos:
GITLAB_PRIVATE_TOKEN=REDACTED git-branch-rename-remote
...
...
@@ -491,13 +492,15 @@ on the commandline as well. For example, this will rename the
The command can also be used to fix
*other*
repositories so that they
correctly rename their local branch too. In that case, the GitLab
repository is already up to date, so there is no need for an access
token, and just running this command will rename
`master`
to
`main`
on
the local repo, including remote tracking branches:
token.
Other users, then can just run this command will rename
`master`
to
`main`
on the local repo, including remote tracking branches:
git-branch-rename-remote
However,
there
ar
e a few extra steps and considerations to
make when
changing the name of a heavily used branch.
Keep in mind that
there
may b
e a few extra steps and considerations to
make when
changing the name of a heavily used branch
, detailed below
.
### Modifying open Merge Requests
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment