wince +sl 群

git 状态管理

git status

 

# deleted: xxx.class

# modified: xxx.xml

查看某个文件的历史,如什么时候被提交上去。

git log file

git log –- xxx.class

直接 git log file 有时会出现下错误

fatal:ambiguous argument unknown revision or path not in the working tree , use –- to separeate paths from revisions

1. 意思是git log 不知道后面是什么参数,因为git log其后面能够带很对象,使用--去指明是使用文件路径

 

删除文件

$ rm a

查看状态

$ git status
On branch test
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    a

添加修改

$ git add .

查看状态

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        deleted:    a

删除提交

$ git commit -m "sync rm a"
[test 150abfb] sync rm a
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 a

删除操作也要同步,类似于startTeam当中本地删除了,在服务器还有,当同步的时候,会显示miss状态

 

注意:

git add .失败解决办法

使用此方法就OK了
$ git add -A  #或 git add -all

 

 

vim中翻页的命令

整页翻页 ctrl-f ctrl-b
f就是forword b就是backward

翻半页
ctrl-d ctlr-u
d=down u=up

滚一行
ctrl-e ctrl-y

http://www.cnblogs.com/orez88/articles/1867879.html

 

使用nano很方便操作

posted @ 2016-02-16 16:24  pengxinglove  阅读(829)  评论(0编辑  收藏  举报
wince +sl 群