- 一、git:
1、丢弃工作区的修改
git checkout -- <filename>
2、把暂存区的修改回退到工作区(即撤销add)
git reset HEAD <filename>
3、看到分支的合并情况
git log --graph --pretty=oneline --abbrev-commit
4、回退到上一个版本
git reset --hard HEAD^
5、回退到指定版本
git reset --hard <版本号>
6、解决。gitignore失效的问题
git rm -r --cached .
git add .
git commit -m 'update .gitignore'
7、添加tag
git tag -a tagName -m commanInfo
git push origin tagName
8、本地分支关联远程并推送到远程
git remote add origin git@github.com:lavenleo/dnd_demo.git
git push -u origin master
//git push origin local_branch:remote_branch
9、远程已删除的分支,本地还有
git remote prune origin
10、将远程分支pull 到本地
git checkout -b 本地分支名 origin/远程分支名
11、删除远程分支
git push origin :serverfix
12、取消本地与远程关联
git remote remove origin
- 二、web storm快捷键
command + b / 点击 定位方法
shift + Enter 软回车 ,无论在前一行代码的什么位置,都能定位到下一行.
command + option + l 代码格式化
fn+option+f7 查看函数哪里调用过
command + e 打开最近打开的文件或者项目 (直接支持文件名搜索)
command + option + 左右箭头 定位到上次编辑的位置
command + fn + f12 查看当前页面所有函数
command + b 跳到变量声明处
command + shift + u 切换大小写