깃 (git) 내가 " 실행했음 status"; 아래는 제목 아래, 일부 수정된 파일 및 / 또는 " commit" 대한 변경, 스테이징된 없습니다. 또한 일부 비 추적 파일을 무시하려면 나열되는지 내가 바라는 건 (I have a " .gitignore"; 파일에 이러한 디렉토리에는).
I want to put 수정한 파일을 저들이요 커밋합니다 스태이징 되나요 깃 (git), 이 때, 내가 " 실행했음 ." 추가, 내가 원하는 파일을 무시하려면 추가했어야 수정된 파일과 스태이징.
How do I 만 수정된 파일과 파일 추가 비 추적 무시하시겠습니까 깃 (git) 아래에 제시된 경우 있는 상태.
또한, 내 " .gitignore" 있다. 파일을 올바르게 작동합니까?
$ git status
# On branch addLocation
# 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: someProject/path/domain/viewer/LocationDO.java
# modified: someProject/path/service/ld/LdService.java
# modified: someProject/path/service/ld/LdServiceImpl.java
# modified: someProject/path/web/jsf/viewer/LocationFormAction.java
# modified: someProject/war/WEB-INF/classes/message/viewer/viewer.properties
# modified: someProject/war/page/viewer/searchForm.xhtml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .metadata/
# someProject/build/
no changes added to commit (use "git add" and/or "git commit -a")
이기티뇨레 너회의 '이상적인' 비 추적 할 수 없도록 하기 위한 파일 (및 무시됨) 에 나와 있는 상태 ',' 깃 (git) 을 사용하여 추가된 추가 상술합니다. 그래서 꼭 이래야겠어요 해결하십시오 이기티뇨레 너회의 '그대에게'
깃 (git) 을 할 수 있는 'u' 스테이징할 삭제된 파일을 수정 및 추가 - 있다는 것입니다.
깃 (git) 할 수도 있습니다 '-' a '만 커밋합니다 커밋하려면 수정 및 삭제된 파일을.
단, 깃 (git) 을 사용할 경우 버전 2.0 버전 이전의 깃 (git) 을 사용해야 할 것이다. ',' 및 '깃 (git) 을 추가 - 그럼 추가 와-u.' (http://otl. " 차이가 "'깃 (git) 을 추가 - A' '와' '깃 (git) 추가.'" ").
이 협력했습니다 가져다줄래요:
#!/bin/bash
git add `git status | grep modified | sed 's/\(.*modified:\s*\)//'`
또는 더 좋다.
$ git ls-files --modified | xargs git add
내가 이렇게 시도하시려면 들어온넘 파일의 목록을 볼 수 있었는데 첫 번째:
git status | grep "modified:" | awk '{print "git add " $2}' > file.sh
cat ./file.sh
chmod a+x file.sh
./file.sh
git status | grep modified | awk '{print $2}' | xargs git add && git status