第一次写博客,就随便记录点什么吧。 好久没使用git了,才发现以前用的很熟的指令现在都忘的差不多了,因此在此记录一下吧。 1.克隆远程库: git clone git@github.com:username/project.git 其中,username是github用户的账户名,project是项目名 2.检测ssh是否配置成功的指令: ssh -T git@github.com 如果出现提示则说明ssh已经配置成功:“ You’ve successfully authenticated, but GitHub does not provide shell access.” 如果没有成功的话:请访问github的help文档: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ 3.修改出错: 当我们提交修改我们可以使用如下指令: git commit -m "提交信息" 如果上一条指令中的“提交”写错该怎么办? 我们可以采用如下指令进行修改: git commit --amend -m "新的说明信息"