Git .ignore不要忽视

时间:2016-11-17 19:03:57

标签: git macos

这是我的.ignore文件

import { Injectable } from '@angular/core'
import { Subject } from 'rxjs/Subject';
import { Message } from 'primeng/primeng';

@Injectable()
export class MessageService {
    messageSource = new Subject<Message>();

    messageSource$ = this.messageSource.asObservable();

    info(summary : string, detail : string) {
        this.messageSource.next({severity:'info', summary: summary, detail: detail});
        console.log("INFO: " + summary + " DETAIL: " + detail);
    }

    error(summary : string, detail : string) {
        this.messageSource.next({severity:'error', summary: summary, detail: detail});
        console.log("ERROR: " + summary + " DETAIL: " + detail);
    }
}

然后我执行.classpath /.project/ /.settings/ /target/ .project .settings .target 然后git add .之后不会忽略文件

git status

1 个答案:

答案 0 :(得分:1)

该文件需要调用.gitignore