window下的github使用步骤

来源:互联网 发布:淘宝熊家通讯 编辑:程序博客网 时间:2024/05/20 12:21

新人粗略讲解,可以参考。

1、在开始菜单里输入 Git bash

2、首先配置你的身份

       git config --global user.name "你的名字"

       git config --global user.email "你的邮箱"

3、进入到项目所在的目录创建仓库

      git init

4、添加本地全部的代码

      git add .

5、提交本地代码(要有描述,不然是不合法的)

      git commit -m "你的描述"

6、查看git中的所有分支

      git branch -a

     创建分支version1.0

     git branch  version1.0

     删除分支version1.0

     git branch -D version1.0

7、与远程代码库的协作

     将版本库代码同步到本地

     git clone https://github.com/dongxi346/Slide-switch.git( 这个地址是在github上创建的代码仓库 )

     git push origin master(将代码同步到master分支上,origin是github上的版本库)

     将本地代码同步到版本库

     git diff origin/master (查看在远程版本库上修改了哪些东西)

     git merge origin/master( 将origin/master分支合并到主分支上)

     git pull origin master

1 0
原创粉丝点击