标签:git push efi rar empty 描述 visit 标签 ranch license
打开cmd 窗口,cd 到 backrestore 执行 composer init 命令
D:\phpStudy\WWW\backrestore>composer init
Welcome to the Composer config generator This command will guide you through creating your composer.json config. Package name (<vendor>/<name>) [administrator/backrestore]: xue-y/backrestore Description []: mysql Backup and restore // 项目描述可以不写 Author [xue-y <1922527784@qq.com>, n to skip]: // 这里跳过使用默认 Minimum Stability []: Package Type (e.g. library, project, metapackage, composer-plugin) []: License []: // 这个可以不填 Define your dependencies. Would you like to define your dependencies (require) interactively [yes]? y Search for a package: Would you like to define your dev dependencies (require-dev) interactively [yes]? y Search for a package: { "name": "xue-y/backrestore", "description": "mysql Backup and restore", "authors": [ { "name": "xue-y", "email": "1922527784@qq.com" } ], "require": {} } Do you confirm generation [yes]? y
这里完成composer 初始化工作,自动生成一下文件
编辑composer.json 文件
{
"repositories": { // 更改镜像源,国外的太慢
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
},
"name": "xue-y/backrestore",
"description": "mysql Backup and restore",
"license": "Apache-2.0",
"minimum-stability":"stable",
"authors": [
{
"name": "xue-y",
"email": "1922527784@qq.com"
}
],
"require": {
"php": ">=5.0"
},
"autoload": { // 添加自动加载
"psr-4": {
"backup\\": "backup/",
"import\\": "import/"
}
}
}
执行 composer install
D:\phpStudy\WWW\backrestore>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
创建后会跳转到下面这个页面,根据你的需要按命令操作
我这个项目现在不是一个存储库,所有先执行了一下 git init 初始化仓库
Administrator@Admin MINGW64 /d/phpStudy/WWW/backrestore
$ git init
Initialized empty Git repository in D:/phpStudy/WWW/backrestore/.git/
Administrator@Admin MINGW64 /d/phpStudy/WWW/backrestore (master)
$ git add README.md
Administrator@Admin MINGW64 /d/phpStudy/WWW/backrestore (master)
$ git commit -m ‘添加第一个测试文件‘
[master (root-commit) d79b36b] 添加第一个测试文件
1 file changed, 76 insertions(+)
create mode 100644 README.md
Administrator@Admin MINGW64 /d/phpStudy/WWW/backrestore (master)
$ git remote add origin https://github.com/xue-y/backrestore.git
Administrator@Admin MINGW64 /d/phpStudy/WWW/backrestore (master)
$ git push -u origin master
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 1.57 KiB | 1.57 MiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for ‘master‘ on GitHub by visiting:
remote: https://github.com/xue-y/backrestore/pull/new/master
remote:
To https://github.com/xue-y/backrestore.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
添加标签
标签:git push efi rar empty 描述 visit 标签 ranch license
原文地址:https://www.cnblogs.com/xuey/p/9734930.html