新建github 代码库(命令行)
Quick setup — if you’ve done this kind of thing before
We recommend every repository include a README, LICENSE, and .gitignore.
…or create a new repository on the command line(通过命令行方式建立一个全新的代码库)
echo "# hello-world" >> README.md git init git add README.md git commit -m "first commit" git remote add origin git@github.com:kuanzi/hello-world.git git push -u origin master
…or push an existing repository from the command line(通过命令行方式,将服务器上的代码与github仓库关联!很有用!)
git remote add origin git@github.com:kuanzi/hello-world.git git push -u origin master
…or import code from another repository(这个是从其他的代码控制系统中迁移代码)
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
在设置的过程中,git commit 会要求你确认你要使用的账号。运行以下指令
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
设置远端,origin是远端的本体,默认名字是origin: git remote -v
新建github代码库(web操作)
https://guides.github.com/activities/hello-world/