首页 > 其他 > 详细

git and github

时间:2017-01-19 07:40:14      阅读:186      评论:0      收藏:0      [点我收藏+]

1新建一个文件夹 

在git代码编辑器里输入 cd e:

一步步进入文件里

2 git clone 加上github上面复制的url

3.将自己的代码复制到自己创建的文件夹里

4.可以一次 git commit -a -m “first change” 回车键

5传送到github上面 git push origin master(这个origin是默认的 也可以通过 git remote)

 

方法:


git config --global user.name(这是获取)

git config --global user.name “zhouatie”(这是登入)

git config --global user.email(这是获取)

git config --global user.email “1114349984@qq.com”(这是获取)

git config --list

查看所有配置项

 

  1. Git命令

   git status  (获取git状态)

   git add  (将新增加的代码从工作区添加到暂存区 )

    name  (比如我要将我的index.html上传就可以通过 git add “index.html”)

     .     (这里是直接将全部上传到暂存区 git add .)

  git commit  (暂存区传到版本区)

       -m    (暂存区传到版本区 后面可以加上备注 比如 git commit -m “first change”)

         -a -m  (这个是一步完成 从工作区到版本区 比如 git commit -a -m “second change”)

 

git and github

原文:http://www.cnblogs.com/zhouatie/p/6298780.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!