git related

1  see all detailed git info about single file

git log --pretty=oneline filename

 2 把git diff显示的变成文件(文件名字pp)

  git diff >pp

3查找git提交log中包含的key words

git log --grep='OTA' ./

 4 修改分支名

 git branch -m currentBranchName newname

5 提交到远程分支,新分支

  git push origin local_brach_name

6 本地初始化空git仓库

 git init 之后就可以git add 和commit了。

7在本地仓库添加一个远程仓库,并将本地的master分支push到远程

git remote add origin ssh://ip_address ~/xxx/.git
git push origin master

 

 8 git apply: trailing whitespace.

Git预先设置了一些选项来探测和修正空白问题,其4种主要选项中的2个默认被打开,另2个被关闭,你可以自由地打开或关闭它们。

默认被打开的2个选项是trailing-spacespace-before-tabtrailing-space会查找每行结尾的空格,space-before-tab会查找每行开头的制表符前的空格。

http://blog.csdn.net/shuyong1999/article/details/7185041

http://openwares.net/linux/git_diff_git_apply_patch.html

http://agile-boy.iteye.com/blog/274366

 

9 git remote rm origin 删除远程分支

   git remote -v 查看远程有几个分支

10 git rm -r foldername 删除文件夹

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值