GIT
2018-08-14 15:05:09 89 举报
AI智能生成
git常用命令整理
作者其他创作
大纲/内容
GIT
Git 远程仓库
添加远程仓库
廖雪峰老师的教程--git添加远程仓库
在远端创建仓库
关联远程仓库
git remote add origin git@gitAddress
删除远程仓库
git remote rm origin
修改远程仓库
git remote set-url origin address
https 和 ssh
廖雪峰老师的教程---远程仓库添加ssh公钥
修改.git/config文件
ssh-keygen -t rsa -C \"youremail@example.com\"
克隆
git clone http://Address
推送
git push
GitHub 搭建站点
个人站点
新建仓库
username.github.io
编写页面
index.html
访问
项目站点
项目主页 settings
自动生成主题页面 GitHub Pages -> [Launch automatic page generator]
设置新建站点基础信息
选择主题
生成网页
基本概念
GitHub
仓库
克隆项目
发起请求
收藏
关注
事物卡片
Git
版本库
暂存区
工作区
Git bash基本操作
设置基本信息
git config --global user.name 'username'
git config --global user.email \"email@example.com\"
git config --list
仓库初始化
mkdir dir
cd dirgit init
分支管理
git checkout -b dev
git branch -d dev
标签管理
新建标签
git tag <tagname>
git tag -a <tagname> -m \"blablabla...\"
git tag
操作标签
git tag -d <tagname>
git push origin <tagname>
git push origin --tags
编写文件和代码
新增文件
修改文件
删除文件
rm -rf filename
工作区、暂存区和仓库
git add filename[filenames....]
git add xx
git add -A .
git add -A
git add .
git add -u
git commit -m \"message\"
git rm filename
查看当前仓库状态
git status
仓库的删除
git remote rm remoteName
rm -rf .git
一些误操作处理
放弃本地本次commit
git checkout .
0 条评论
回复 删除
下一页