LoginSignup
1

More than 1 year has passed since last update.

【github】公開リポジトリをforkし、プライベートリポジトリを作成する。

Posted at

はじめに

githubで公開中のリポジトリをforkして、privateリポジトリを作成する方法です。
GUIで操作すると、プライベートリポジトリにできないので、備忘録程度にやり方を記載しておきます。
ちなみに、GUIで操作すると下記画像のように、リポジトリをprivate化できません。
スクリーンショット 2023-01-06 17.18.52.png

やり方

①あらかじめプライベートリポジトリを作成しておきます。
②gitコマンドでfork対象のリポジトリをローカルインストールします。

forkしたいリポジトリをローカルインストール
git clone --bare https://github.com/ユーザ名/対象リポジトリ

③作成したプライベートリポジトリにPushする。

git push --mirror https://github.com/kouji0705/XXXX.git

これでOK!!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1