linux 开发常用命令git
2015-03-31 16:47
417 查看
git push origin HEAD:refs/for/master
git stash, git stash pop
git config --global user.name yu.li
git checkout <branch_name> -- <paths>
git checkout commit-id <file>
git reset --soft HEAD^
#git cancel commit
git reset HEAD^
#PS: HEAD^ is equal to HEAD~1
git blame -L 428,+10 [FILE_LOCATION]
git blame -w # 忽略移除空白这类改动 git blame -M # 忽略移动文本内容这类改动 git blame -C # 忽略移动文本内容到其它文件这类改动
git rev-list --all | xargs git grep -F 'pattern'
# 查看几行代码的修改记录
$ LINE=1260 FILE=[FILE_LOCATION] REVS=5; for commit in $(git rev-list -n $REVS HEAD $FILE); do git blame -n -L$LINE,+7 $commit -- $FILE; echo; done
$ gitk -L1260,+7:[FILE_LOCATION]
jobs -p
kill `jobs -p`
ps aux | grep '[t]omcat' | awk '{print $2}' | xargs kill -9
# update softlink
ln -nsf dir linkname
# 删除所有隐藏文件
find . -type f -name ".*" | xargs rm
git stash, git stash pop
git config --global user.name yu.li
git checkout <branch_name> -- <paths>
git checkout commit-id <file>
git reset --soft HEAD^
#git cancel commit
git reset HEAD^
#PS: HEAD^ is equal to HEAD~1
git blame -L 428,+10 [FILE_LOCATION]
git blame -w # 忽略移除空白这类改动 git blame -M # 忽略移动文本内容这类改动 git blame -C # 忽略移动文本内容到其它文件这类改动
git rev-list --all | xargs git grep -F 'pattern'
# 查看几行代码的修改记录
$ LINE=1260 FILE=[FILE_LOCATION] REVS=5; for commit in $(git rev-list -n $REVS HEAD $FILE); do git blame -n -L$LINE,+7 $commit -- $FILE; echo; done
$ gitk -L1260,+7:[FILE_LOCATION]
jobs -p
kill `jobs -p`
ps aux | grep '[t]omcat' | awk '{print $2}' | xargs kill -9
# update softlink
ln -nsf dir linkname
# 删除所有隐藏文件
find . -type f -name ".*" | xargs rm
相关文章推荐
- Linux开发中的常用命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- linux常用开发命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- Linux开发中的常用命令
- 开发人员需要熟知的常用Linux命令之一:重定向操作符
- 开发人员需要熟知的常用Linux命令之五:Find
- 开发人员需要熟知的常用Linux命令之二:Crontab
- 开发人员需要熟知的常用Linux命令之三:Vi
- 开发人员需要熟知的常用Linux命令之四:Scp
- 开发人员需要熟知的常用Linux命令之六:Rpm
- 开发人员需要熟知的常用Linux命令之七:Gzip及其常用打包、压缩、解压命令
- 开发人员需要熟知的常用Linux命令之八:Version、Kernel查看
- 在linux下开发常用命令..
- Linux开发中的常用命令(cygwin环境也同样适用)