git and github

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”)

 

posted @ 2017-01-19 00:55  我是南方大汉  阅读(139)  评论(0)    收藏  举报