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

Commita5aa75f

Browse files
committed
chore: update the project's default branch from 'master' to 'main'
1 parentb7da131 commita5aa75f

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

‎.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Review our[guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/master/CONTRIBUTING.md) to this repository. A good start is to:
1+
Review our[guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/main/CONTRIBUTING.md) to this repository. A good start is to:
22

33
* Write tests for your changes
44
* Run`rake` before pushing

‎.github/workflows/continuous_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
pull_request:
5-
branches:[master]
5+
branches:[main]
66
workflow_dispatch:
77

88
jobs:

‎.github/workflows/enforce_conventional_commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
on:
88
pull_request:
99
branches:
10-
-master
10+
-main
1111

1212
jobs:
1313
commit-lint:

‎.github/workflows/experimental_continuous_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI Experimental
22

33
on:
44
push:
5-
branches:[master]
5+
branches:[main]
66

77
workflow_dispatch:
88

‎.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: |
1111
1212
on:
1313
push:
14-
branches:["master"]
14+
branches:["main"]
1515

1616
workflow_dispatch:
1717

‎README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
99
[![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/git/)
1010
[![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/git/file/CHANGELOG.md)
11-
[![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=master)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
11+
[![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=main)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
1212
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
1313

1414
-[📢 We've Switched to Conventional Commits 📢](#-weve-switched-to-conventional-commits-)
@@ -275,8 +275,8 @@ g.branches # returns Git::Branch objects
275275
g.branches.local
276276
g.current_branch
277277
g.branches.remote
278-
g.branches[:master].gcommit
279-
g.branches['origin/master'].gcommit
278+
g.branches[:main].gcommit
279+
g.branches['origin/main'].gcommit
280280

281281
g.grep('hello')# implies HEAD
282282
g.blob('v2.5:Makefile').grep('hello')
@@ -333,7 +333,7 @@ Git.ls_remote('https://github.com/ruby-git/ruby-git.git') # returns a hash conta
333333
Git.ls_remote('/path/to/local/repo')
334334
Git.ls_remote()# same as Git.ls_remote('.')
335335

336-
Git.default_branch('https://github.com/ruby-git/ruby-git')#=> 'master'
336+
Git.default_branch('https://github.com/ruby-git/ruby-git')#=> 'main'
337337
```
338338

339339
And here are the operations that will need to write to your git repository.
@@ -406,13 +406,13 @@ g.branch('new_branch') # creates new or fetches existing
406406
g.branch('new_branch').checkout
407407
g.branch('new_branch').delete
408408
g.branch('existing_branch').checkout
409-
g.branch('master').contains?('existing_branch')
409+
g.branch('main').contains?('existing_branch')
410410

411411
# delete remote branch
412412
g.push('origin','remote_branch_name',force:true,delete:true)
413413

414414
g.checkout('new_branch')
415-
g.checkout('new_branch',new_branch:true,start_point:'master')
415+
g.checkout('new_branch',new_branch:true,start_point:'main')
416416
g.checkout(g.branch('new_branch'))
417417

418418
g.branch(name).merge(branch2)
@@ -422,7 +422,7 @@ g.branch(name).in_branch(message) { # add files } # auto-commits
422422
g.merge('new_branch')
423423
g.merge('new_branch','merge commit message',no_ff:true)
424424
g.merge('origin/remote_branch')
425-
g.merge(g.branch('master'))
425+
g.merge(g.branch('main'))
426426
g.merge([branch1, branch2])
427427

428428
g.merge_base('branch1','branch2')

‎bin/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require 'bundler/setup'
1111

1212
`git config --global user.email "git@example.com"`if`git config --global user.email`.empty?
1313
`git config --global user.name "GitExample"`if`git config --global user.name`.empty?
14-
`git config --global init.defaultBranchmaster`if`git config --global init.defaultBranch`.empty?
14+
`git config --global init.defaultBranchmain`if`git config --global init.defaultBranch`.empty?
1515

1616
project_root=File.expand_path(File.join(__dir__,'..'))
1717

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp