2015-01-09 24 views
7

私はGit Bashを使ってリモートgitリポジトリを削除しようとしています。私はGitHubを通して削除できることを知っています。しかし、私はコマンドラインを通してそうする方法を学びたいと思う。私は単にファイルを削除したい、または置き換えるだけではなく、完全に削除したいのです。私はフォーラム、記事、ブログ、チュートリアルを通して最後の2日間過ごしましたが、何も効果がありませんでした。リモートGitリポジトリをコマンドラインから削除するにはどうすればいいですか(Git Bash)?

いくつかの初期情報:

$ git remote -v 
thisbranch https://github.com/thisuser/test-repo.git (fetch) 
thisbranch https://github.com/thisuser/test-repo.git (push) 

$ git status 
On branch master 
nothing to commit, working directory clean 

$ git log 
Author: *info* 
Date: *info* 
    adding a new file 
Author: *info* 
Date: *info* 
    Initial commit 

$ git remote -v show thisbranch 
* remote thisbranch 
    Fetch URL: https://github.com/thisuser/test-repo.git 
    Push URL: https://github.com/thisuser/test-repo.git 
    HEAD branch: master 
    Remote branch: 
    master tracked 
    Local ref configured for 'git push': 
    master pushes to master (up to date) 

いくつかのものは、私が試した:私は私を実現しました

$ git remote remove https://github.com/thisuser/test-repo.git 
error: Could not remove config section 'remote.https://github.com/thisuser/test-repo.git' 

$ git remote remove master 
error: Could not remove config section 'remote.master' 

$ git remote remove thisbranch 
*returns nothing* 

$ git remote -v 
*returns nothing* 

も名 'の起源' を返されない飽きません。

+1

これは実行できません。 – BrokenBinary

答えて

5

としては、これを行うことができない、his commentにBrokenBinaryによって

を指摘しました。

あなたはピリオド、それはGitのBashの中や他の場所でも、Gitのコマンドで(GitHubの上または他の場所でホストされている)リモートレポを削除することはできません。 delete remote branches(書き込み権限があるものとします)、はい、リモートリポジトリ全体ではありません。

ただし、GitHub Developer APIでは、シェルからGitHubでホストされているリポジトリを削除できます。もし上記の

+1

@BrokenBrinaryとJubobsに感謝します。私はGitHubサイトからreposを直接削除することにします。 – dahiana

1

としてJubobsので、githubのdevのAPIを使用することができます。 curl -u :username -X "DELETE" https://api.github.com/repos/:username/:repo =ユーザー名(githubのハンドラ)とユーザーネーム:レポすると、あなたが

を取り除きたいレポの名前を=
関連する問題