github基本操作
git init 添加到版本管理
新建.gitignore文件,写入不需要push的文件 eg:node_modules bower_components .idea ....
git status查看
git add -A
git rm -r --cached . 撤销刚刚的git add操作
git commit -m "first version" 提交到本地库 -m 添加注释
git tag 0.1.0 将tag提交到本地库
git remote add origin https://github.com/kenfo/svg.git 在github上创建svg项目
git push origin master 将版本推送到github上
git push origin 0.1.0 将tag推送
如果是直接通过git clone https://github.com/xxg3053/xxx.git下载下来的项目 就不需要 git remote add origin https://xxxxx
git的密码
在项目界面按t进入查找界面 ESC退出
在项目的setting里面删除项目
git branch -a 查看远程分支
git branch 查看本地分支
git branch xxxx 创建分支
git checkout secondBranch 切换到secondBranch分支
git branch -d xxxxx 删除本地分支
git branch xxxx 创建分支
git push origin gh-pages:gh-pages 提交本地gh-pages分支作为远程的gh-pages分支
git config --global user.name [username] 设置全局用户名
git config --global user.email [email]