Git是一个分布式的版本控制系统,最初由Linus Torvalds编写,用作Linux内核代码的管理。在推出后,Git在其它项目中也取得了很大成功,尤其是在Ruby社区中。目前,包括Rubinius、Merb和Bitcoin在内的很多知名项目都使用了Git。Git同样可以被诸如Capistrano和Vlad the Deployer这样的部署工具所使用。 
新手在第一次练习使用时,在使用git commit命令时会执行失败,比如我在首次使用时先使用git init命令初始化本地仓库,然后要用git commit -m "Initial commit"命令提交,但是提示失败:
*** Please tell me who you are.

Run

  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.

fatal: unable to auto-detect email address (got 'Aoliaovier@HaoyongWin10PC.(none

)’)
无法提交
命令执行失败的原因是没有在本地设置用户名和邮箱,在命令行设置一下即可: git config –global user.email “you@example.com”
git config –global user.name “Your Nam”, 然然后重新用git commit -m “Initial commit”命令提交。

这就搞定了
最后输入git push -u origin master ,将你本地的仓库提交到你的github账号里此时会要求你输入你的github的账号和密码。

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐