git里ignore文件有四种方式
- 最基本的,放在.gitignore里
- 还未track的文件,但是不想放到.gitignore里,可以放到 .git/info/exclude里
vim .git/info/exclude
- 已经track的文件,而且被本地修改了,想要ignore本地的修改
find ./ -name "*.launch" -exec git update-index --[no-]skip-worktree '{}' ;
| <?xml version="1.0" encoding="UTF-8"?> | |
| <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> | |
| <channel> | |
| <item> | |
| <g:id>demo_14</g:id> | |
| <g:multipack>0</g:multipack> | |
| <g:brand>Studio Design</g:brand> | |
| <g:gtin></g:gtin> | |
| <g:sku>demo_14</g:sku> | |
| <g:item_group_id>19</g:item_group_id> |
| <?xml version="1.0" encoding="utf-8"?> | |
| <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> | |
| <channel> | |
| <title>Advertiser 005</title> | |
| <description>Advertiser 005 data feed template.</description> | |
| <link>http://testadvertiser005.com</link> | |
| <item> | |
| <title>product_0</title> | |
| <g:image_link>http://www.testadvertiser005.com/img.php?p=0</g:image_link> | |
| <link>http://www.testadvertiser005.com/product.php?p=0</link> |
| tail -f verbosegc.log | grep "concurrent mark-sweep generation " |
| git subtree add --prefix=atlas-gui "[email protected]:atlas/atlas-gui.git" dev |
| Sometimes, master branch contains obsolete codes, and another branch is more "stable" and will be released to production. | |
| If you merge this branch into master, you will find a lot of conflits for unknonw reason. And now, you want to make the other branch as your master. | |
| You can: | |
| git checkout more_stable_branch | |
| git merge -s ours master | |
| git checkout master | |
| git merge more_stable_branch |
| * If want to declare private constans, define in .m file | |
| static NSString *const MyThingNotificationKey = @"MyThingNotificationKey"; | |
| * If want to declare public constants, declare in .h file: | |
| extern/FOUNDATION_EXTERN NSString *const name in | |
| and define the value in .m file: | |
| MyClass.class.getProtectionDomain().getCodeSource() |
| git config --global credential.helper wincred | |
| git config credential.helper 'cache --timeout=3600' |
| There are 4 ways to ignore git files: | |
| 1. The most basic, add to .gitignore | |
| 2. Not yet tracked file, and don't want to add to .gitignore, can add to .git/info/exclude | |
| This will just ignore files locally and the settings will not be shared with others | |
| 3. Already tracked files, and has already been modified locally, want to ignore local changes | |
| git update-index --[no-]skip-worktree FILE_NAME // works for one file |
git里ignore文件有四种方式
vim .git/info/exclude
find ./ -name "*.launch" -exec git update-index --[no-]skip-worktree '{}' ;