sourcetree,git 忽略不需要提交的文件步骤

1:找到git对应的文件

git status

结果:

git statusOn branch masterYour branch is up-to-date with 'origin/master'.Changes to be committed:  (use "git reset HEAD..." to unstage)

modified:  YYBaby/YYBaby.xcodeproj/project.xcworkspace/xcuserdata/jianjian.xcuserdatad/UserInterfaceState.xcuserstate

modified:  YYBaby/YYBaby.xcodeproj/xcuserdata/jianjian.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

modified:  YYBaby/YYBaby.xcodeproj/xcuserdata/jianjian.xcuserdatad/xcschemes/YYBaby.xcscheme

modified:  YYBaby/YYBaby.xcodeproj/xcuserdata/jianjian.xcuserdatad/xcschemes/xcschememanagement.plist

2:删除缓存

git rm --cached 'YYBaby/YYBaby.xcodeproj/project.xcworkspace/xcuserdata/jianjian.xcuserdatad/UserInterfaceState.xcuserstate'

3:删除远程的文件

git commit -m 'YYBaby/YYBaby.xcodeproj/project.xcworkspace/xcuserdata/jianjian.xcuserdatad/UserInterfaceState.xcuserstate'

4: 提交

git push

5:在sourcetree中右键忽略不需要的文件

你可能感兴趣的:(sourcetree,git 忽略不需要提交的文件步骤)