美文网首页
windows下gitHub笔记!

windows下gitHub笔记!

作者: DragonersLi | 来源:发表于2017-07-02 00:38 被阅读13次

https://github.com/ 注册账号登陆!
https://desktop.github.com/ 软件下载地址!
https://www.git-scm.com/download/win Windows下载Git地址!

GitHub:

Paste_Image.png
安装完成后,桌面鼠标右击,菜单会出现如下图:
Paste_Image.png
新建项目文件夹进入后鼠标右击,选 Git Bash Here !进入命令行,输入如下两行命令配置用户名和邮箱。
Paste_Image.png

//获取配置列表
git config --list

//配置用户名
git config --global user.name 'DiorsCoder'

//配置邮箱
git config --global user.email '865196792@qq.com'

//创建项目目录并进入
mkdir  dirName
cd  dirName

//git控制
git init  

Paste_Image.png
Paste_Image.png
使用Git添加文件到暂存区,可以使用linux命令也可以windows界面操作!
//创建,编辑,查看文件内容
touch  fileName
vim fileName
cat fileName

//查看状态
git status

//添加 & 修改:先添加或修改本地文件,再提交到 Git 暂存区 ,最后提交! 
  
git add fileName 
git commit -m ‘备注’  
git push

//删除文件步骤:
rm fileName 
git rm fileName
git commit  -m ‘备注’
git push

//删除文件夹步骤:
rm -rf dirName
git rm -rf dirName
git commit(文件写入备注)
git push

一.添加文件到暂存区:


Paste_Image.png

二.提交文件到版本库


Paste_Image.png

从 GitHub 上 复制仓库地址,在本地 使用命令:git clone https://github.com/GitHub账户/项目名.git ,把项目克隆至本地。

Paste_Image.png Paste_Image.png
//查看所有分支
 git branch -a

//切换分支
git checkout 分支名称

//合并其它分支代码
git merge 其它分支名称

//查看日志
git log

//更新仓库最新代码至本地
git pull


 

 
 

登录GitHub新建仓库:账户名.github.io,新建html文件:index.html。例如:DiorsCoder.github.io

Paste_Image.png
然后浏览器输入访问:https://账户名.github.io
例如:https://diorscoder.github.io

相关文章

  • windows下gitHub笔记!

    https://github.com/ 注册账号登陆!https://desktop.github.com/ ...

  • windows下使用github

    安装 gitbash 生成 sshkey 在系统用户文件夹下寻找.ssh文件夹,里面有两个文件id_rsa和id_...

  • Git

    Git使用笔记 下载(Window版):https://git-for-windows.github.io/ 安装...

  • windows下记住github密码

    刚开始使用git的时候,每次push到github都要输用户名密码,非常之蛋疼。然后我搜了一下,有几种方法都可以记...

  • Windows下使用Redis

    1、下载 Windows下使用Redis需要到GitHub上下载,链接:https://github.com/MS...

  • linux下git的安装和使用

    linux下git的安装和使用 最近在使用github,感觉不错。在windows下,可使用github提供的wi...

  • Window 10 tensorflow 环境管理 Pychar

    [TOC] 介绍 tensorflow 0.12.0开始支持Windows下安装 https://github.c...

  • WindowsExploits

    https://github.com/abatchy17/WindowsExploits windows下的所有poc

  • Dapr安装

    在Windows下,安装Dapr首先要下载文件dapr_windows_amd64.zip,可以从Github下载...

  • flutter开始

    下载 windows 环境下:git clone -b master https://github.com/flu...

网友评论

      本文标题:windows下gitHub笔记!

      本文链接:https://www.haomeiwen.com/subject/jqufottx.html