98 lines
3.5 KiB
HTML
98 lines
3.5 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<meta name="theme-color" content="#00cc00">
|
|
<link rel="icon" type="image/png" sizes="192x192" href="https://tilde.team/apple-touch-icon-precomposed.png">
|
|
<link rel="icon" type="image/png" sizes="96x96" href="https://tilde.team/favicon-96x96.png">
|
|
|
|
<link rel="stylesheet" href="https://tilde.team/~ben/gruvbox/gruvbox.css">
|
|
<link rel="stylesheet" href="extra.css">
|
|
|
|
<link rel="alternate" type="application/rss+xml" title="subscribe to this page..." href="feed.rss" />
|
|
<title>default branch name</title>
|
|
</head><body>
|
|
<main>
|
|
|
|
<div id="divbodyholder">
|
|
<div class="headerholder"><div class="header">
|
|
<div id="title">
|
|
<h1 class="nomargin"><a class="ablack" href="https://tilde.team/~ben/blog/index.html">blog // ~ben</a></h1>
|
|
<div id="description">a blog about tildes and other things</div>
|
|
</div></div></div>
|
|
<div id="divbody"><div class="content">
|
|
<!-- entry begin -->
|
|
<h3><a class="ablack" href="default-branch-name.html">
|
|
default branch name
|
|
</a></h3>
|
|
<!-- bashblog_timestamp: #202006161518.54# -->
|
|
<div class="subtitle">June 16, 2020 —
|
|
~ben
|
|
</div>
|
|
<!-- text begin -->
|
|
|
|
<p>changing git's default branch name has come up recently as an easy action
|
|
we can take to update our language and remove harmful ideas from our daily
|
|
usage.</p>
|
|
|
|
<p>i'm concerned that this effort to change the language used is ultimately a
|
|
symbolic gesture to avoid scrutiny into actual change (notably github's
|
|
push for this change and continued contracts with ICE).</p>
|
|
|
|
<p>however, it's an easy change to make.</p>
|
|
|
|
<p>let's have a look at how to change it for new repos:</p>
|
|
|
|
<pre><code>mkdir -p ~/.config/git/template
|
|
echo "ref: refs/head/main" ~/.config/git/template/HEAD
|
|
git config --global init.templateDir ~/.config/git/template
|
|
</code></pre>
|
|
|
|
<p>note that you can put this template dir anywhere you like.</p>
|
|
|
|
<p>you can also set this system-wide (not just for your user)
|
|
in /usr/share, but note that this might get overriden by
|
|
package updates.</p>
|
|
|
|
<pre><code>echo "ref: refs/head/main" | sudo tee /usr/share/git-core/templates/HEAD
|
|
</code></pre>
|
|
|
|
<p>the next time you <code>git init</code>, you'll be on a branch named main.</p>
|
|
|
|
<p>to change an existing repo, you can use the <code>-m</code> switch of <code>git-branch</code>:</p>
|
|
|
|
<pre><code>git checkout master
|
|
git branch -m master main
|
|
</code></pre>
|
|
|
|
<p>push with <code>-u</code> to your remote if needed and update the default branch in the
|
|
repo settings in the hosting platform of choice.</p>
|
|
|
|
<p>it's a relatively easy change, but don't kid yourself that it makes any real
|
|
impact. go protest, <a href="
|
|
https://blacklivesmatter.carrd.co/">donate and sign petitions</a>, and get out there to fix the actual problems.</p>
|
|
|
|
<p>tags: <a href='tag_git.html'>git</a>, <a href='tag_linux.html'>linux</a>, <a href='tag_dev.html'>dev</a></p>
|
|
|
|
|
|
<!-- text end -->
|
|
<!-- entry end -->
|
|
</div>
|
|
<div id="footer">CC by-nc-nd <a href="https://tilde.team/~ben/">~ben</a> — <a href="mailto:ben@tilde.team">ben@tilde.team</a><br>
|
|
generated with <a href="https://tildegit.org/team/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>
|
|
</div></div>
|
|
<script src="https://utteranc.es/client.js"
|
|
repo="benharri/tilde"
|
|
issue-term="title"
|
|
crossorigin="anonymous"
|
|
theme="github-dark"
|
|
async>
|
|
</script>
|
|
|
|
</main>
|
|
<br>
|
|
</body></html>
|