yangyan

Github Repository API中说明了可以通过发送一个请求来认证,之后就能通过命令行自动新建远程仓库了。

认证

curl -u \'username\' https://api.github.com/user/repos -d \'{"name":"RepoName"}\'
替换值 说明
username github 的用户名
RepoName 新建的仓库名

本地新建仓库

$ touch README.md
$ git init
$ git add *
$ git commit -m "first commit"
$ git remove add origin https://github.com/yourname/RepoName.git
$ git push -u origin master
//参数-u 以后就可以直接用不带参数的git pull从之前push到的分支来pull

分类:

技术点:

相关文章:

  • 2021-09-10
  • 2021-11-23
  • 2022-01-13
  • 2022-12-23
  • 2021-08-18
  • 2021-04-01
  • 2021-06-10
  • 2022-02-07
猜你喜欢
  • 2021-05-19
  • 2021-07-05
  • 2022-02-07
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案