git记录
1.创建项目 首先登录到到github网站。登录用户名密码。然后“New repository”建自己的项目名称。如myweb 2.在本地选择项目目录。如myweb,然后进入myweb文件夹。输入“git init”,这样这个目录里面的内容就会被git管理起来了 3.把本地项目myweb加入到本地仓库。命令是在myweb文件夹下,执行命令“git add *”。把所有的都加入本地仓库。然后提交。命令是“git commit -m ‘这个地方是注释’” 4.建立本地仓库和远程仓库的连接。命令是git remote add {$remote_name} {$clone_url}。其中remote_name是自己起的一个别名。如myweb。clone_url是github网站上自己创建的项目。也就是1中创建的项目的连接。如1中建立的myweb的连接是https://github.com/yanghuiping/myweb.git,这样就可以用别名myweb代替https://github.com/yanghuiping/myweb.git了。 5.把本地的仓库中的代码提交到github网站上去。命令是:git push myweb(别名,也可以是地址https://github.com/yanghuiping/myweb.git) master 6.执行完成之后就提交到github上了