目录

GitHub官方git代码

Quick setup — if you’ve done this kind of thing before

Set up in Desktop

or

HTTPS

https://github.com/xinqinew/NewCode.git

SSH

git@github.com:xinqinew/NewCode.git

Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.

在命令行上创建新的存储库

1
2
3
4
5
6
7
echo "# NewCode" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:xinqinew/NewCode.git
git push -u origin main

从命令行推出现有存储库

1
2
3
git remote add origin git@github.com:xinqinew/NewCode.git
git branch -M main
git push -u origin main

从另一个存储库中导入代码

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

Import code