Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commitf99760a

Browse files
committed
Post for default branch
1 parenta4ade3c commitf99760a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
kind: change
3+
title: Set the default branch for a repository
4+
created_at: 2012-10-24
5+
author_name: pengwynn
6+
---
7+
8+
You can set the default branch for a repository to something other than 'master' from the GitHub repository admin screen:
9+
10+
![repo admin](/images/posts/default-branch.png)
11+
12+
Now, you can update this setting via the API. We've added a `default_branch` parameter to the [Edit Repository method][edit-repo]:
13+
14+
<preclass="terminal">
15+
curl -u pengwynn \
16+
-d '{"name": "octokit", "default_branch":"development"}' \
17+
https://api.github.com/repos/pengwynn/octokit
18+
</pre>
19+
20+
If you provide a branch name that hasn't been pushed to GitHub, we'll gracefully fall back to `'master'` or the first branch.
21+
22+
[edit-repo]: /v3/repos/#edit
25.4 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp