git create repository on the command line

GitHub项目创建与推送指南
本文详细介绍如何在本地创建一个Git仓库并将其推送到GitHub上,包括初始化仓库、添加及提交文件、关联远程仓库和推送代码等关键步骤。同时,还介绍了如何在macOS上配置Git账号信息。
create a new repository on the command line
echo "# moses-boot-jasper" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/glory2018/moses-boot-jasper.git
git push -u origin master
push an existing repository from the command line
git remote add origin https://github.com/glory2018/moses-boot-jasper.git
git push -u origin master
创建项目

得到一个github地址,如https://github.com/glory2018/moses-boot-jasper.git
git init
把moses-boot-jasper变成git可以管理的仓库

忽略文件.gitignore,内容格式如:node_modules/,创建命令touch .gitignore

git add .
添加所有文件到暂存区


git commit -m "first commit"
文件提交到仓库

git remote add origin https://github.com/glory2018/moses-boot-jasper.git
关联远程仓库

git pull --rebase origin master
获取远程库与本地同步

git push -u origin master
推送本地内容到远程库

macOS配置Git账号信息

git config --global user.name "账号"
git config --global user.email "邮箱"

macOS查看当前配置的Git账号信息

git config --global user.name
git config --global user.email

# influx-cli CLI for managing resources in InfluxDB v2 ## Motivation This repository decouples the `influx` CLI from the OSS `influxdb` codebase. Our goals are to: 1. Make it easier to keep the CLI up-to-date with InfluxDB Cloud API changes 2. Enable faster turn-around on fixes/features that only affect the CLI 3. Allow the CLI to be built & released for a wider range of platforms than the server can support ## Building the CLI Follow these steps to build the CLI. If you're updating your CLI build, see *Updating openapi* below. 1. Clone this repo (influx-cli) and change to your _influx-cli_ directory. ``` git clone git@github.com:influxdata/influx-cli.git cd influx-cli ``` 2. Build the CLI. The `make` and `make influx` commands write the new binary to `bin/$(GOOS)/influx`. ``` make ``` ### Updating openapi If you change or update your branch, you may also need to update `influx-cli/openapi` and regenerate the client code. `influx-cli/openapi` is a Git submodule that contains the underlying API contracts and client used by the CLI. We use [`OpenAPITools/openapi-generator`](https://github.com/OpenAPITools/openapi-generator) to generate the HTTP client. To update, run the following commands in your `influx-cli` repo: 1. Update the _openapi_ Git submodule. The following command pulls the latest commits for the branch and all submodules. `git pull --recurse-submodules` 2. With [Docker](https://docs.docker.com/get-docker/) running locally, regenerate _openapi_. `make openapi` 3. Rebuild the CLI `make` ## Running the CLI After building, use `influx -h` to see the list of available commands. ### Enabling Completions The CLI supports generating completions for `bash`, `zsh`, and `powershell`. To enable completions for a single shell session, run one of these commands: ``` # For bash: source <(influx completion bash) # For zsh: source <(influx completion zsh) # For pwsh: Invoke-Expression ((influx completion powershell) -join "`n`") ``` To enable completions across sessions, add the appropriate line to your shell's login profile (i.e. `~/.bash_profile`). ## Testing Run `make test` to run unit tests. 翻译,看不懂
最新发布
10-16
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值