-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathGit-Rename-Master.html
83 lines (69 loc) · 3.45 KB
/
Git-Rename-Master.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>dev blog</title>
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/pygment_trac.css">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
});
</script>
<script type="text/javascript" src="js/MathJax.js"></script>
<!-- <script type="text/javascript" src="{{config.extra.base}}js/MathJax.js?config=TeX-AMS_HTML""></script> -->
<script type="text/javascript" src="js/audience-minutes.js"></script>
<meta name="viewport" content="width=device-width">
</head>
<body>
<div class="wrapper">
<header>
<h1>Dev Blog</h1>
<table>
<body>
<tr><td><a href="./">./dev</a></td></tr>
<tr>
<td>
<br /> <br /> <br />
<p><small> Original theme by <a href="https://github.com/orderedlist">orderedlist</a> (CC-BY-SA)</small></p>
<br />
<p>
Where applicable, all content is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a>.
<br />
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="img/cc-by-sa-80x15.png" /></a>
</p>
</td>
</tr>
</body>
</table>
</header>
<section>
<h2 id="renaming-master-branch-to-release">Renaming <code>master</code> branch to <code>release</code></h2>
<p>From <a href="http://stackoverflow.com/questions/8762601/how-do-i-rename-my-git-master-branch-to-release">Adam Dymitruk on SO</a></p>
<pre><code>git checkout -b release master # create and switch to the release branch
git push -u origin release # push the release branch to the remote and track it
git branch -d master # delete local master
</code></pre>
<p>If you're using GitHub (as I am), issuing the next needed command (<code>git push --delete origin master</code>) will fail because GitHub won't let you delete the default branch, which is stil <code>master</code>.</p>
<p>In order to successfully be able to delete the remote <code>master</code> branch, you have to set the default branch on GitHub to be the newly created branch (i.e. <code>release</code>).</p>
<p><img src="/img/gh-branches.png" alt="GitHub Edit Default Branches Admin Web Page" /></p>
<p>After the default branch has been changed to the newly created branch (<code>release</code> in this case), issuing the following commands will now work:</p>
<pre><code>git push --delete origin master # delete remote master
git remote prune origin # delete the remote tracking branch
</code></pre>
<h2 id="note">NOTE</h2>
<p>Apparantly GitHub does not allow wikis to be anything other than the master branch. This is why I had to move to my own hosting service to continue this dev blog.</p>
<h6 id="2016-09-21">2016-09-21</h6>
</section>
<!--
<footer>
<p><small> Original theme by <a href="https://github.com/orderedlist">orderedlist</a> (CC-BY-SA)</small></p>
</footer>
-->
</div>
<script src="js/scale.fix.js"></script>
</body
</html>