某些時候修改了文件權(quán)限后宫盔,git status 會發(fā)現(xiàn)許多文件都發(fā)生了變化
tianqingsedengyanyu:qifa fengfeng$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: app/admin/control/login.php
modified: app/member/control/connect_sms.php
modified: temp/cache/adv/index.html
modified: temp/cache/index.html
modified: temp/cache/index/index.html
modified: temp/cache/phpqrcode/index.html
modified: temp/cache/rec_position/index.html
modified: temp/session/index.html
no changes added to commit (use "git add" and/or "git commit -a")
tianqingsedengyanyu:qifa fengfeng$
查看文件修改
tianqingsedengyanyu:qifa fengfeng$ git diff temp/cache/phpqrcode/index.html
diff --git a/temp/cache/phpqrcode/index.html b/temp/cache/phpqrcode/index.html
old mode 100644
new mode 100755
tianqingsedengyanyu:qifa fengfeng$
因為修改了項目權(quán)限 chmod -R 777 /Users/fengfeng/Desktop/bbc
使用git忽略掉權(quán)限變化
.git/config => filemode = false
tianqingsedengyanyu:qifa fengfeng$ vim .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = http://1**.224.27.8:88/****_team/***.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = http://1**.224.27.8:88/****_team/***.git
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "dev"]
remote = origin
merge = refs/heads/dev
再次查看
tianqingsedengyanyu:qifa fengfeng$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: app/admin/control/login.php
modified: app/member/control/connect_sms.php
no changes added to commit (use "git add" and/or "git commit -a")
tianqingsedengyanyu:qifa fengfeng$
不定期更新 不合適的地方 還請指點~ 感激不盡