Comments (5)
現在の状態
GitHubの状態
普通のmasterへの直pushはできる
$ git commit --allow-empty -m "test"
[master db1e93e] test
$ git push origin master
Counting objects: 1, done.
Writing objects: 100% (1/1), 181 bytes | 181.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To github.com:camp17-extra/poptweet-api.git
4bf351d..db1e93e master -> master
from poptweet-api.
一応、さっきのテストでコミットしたやつは戻しておこう...
なるほど....Protected branchをmasterに設定するとforce pushできないのか
一旦Protected branchの設定は外してforce pushして、さっきのからコミットは消しておきます
$ git push -f origin master
Total 0 (delta 0), reused 0 (delta 0)
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Cannot force-push to a protected branch
To github.com:camp17-extra/poptweet-api.git
! [remote rejected] master -> master (protected branch hook declined)
error: failed to push some refs to '[email protected]:camp17-extra/poptweet-api.git'
GithubでProtectd branchの設定を外す
再度、やってみる
$ git push -f origin master
Total 0 (delta 0), reused 0 (delta 0)
To github.com:camp17-extra/poptweet-api.git
+ db1e93e...4bf351d master -> master (forced update)
成功した。
テストCommitを消しました
from poptweet-api.
https://qiita.com/kazuph/items/825d9d3ff9cacc279bbc の記事を参考に
特定ブランチへのマージ時にステータスチェックを必須にする
も設定した
from poptweet-api.
git push origin master
を防ぐには個々のPCでgit hooks
を設定しないといけないみたい
https://qiita.com/akymrk/items/b46b03b313850e3ae418
from poptweet-api.
とりあえず、git push -f origin master
が防いでいることはわかったので、closeします
git push origin master
を防ぐには個々のPCでgit hooksを設定する感じになりそうです
from poptweet-api.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poptweet-api.