Tôi đã làm một git commit -m "message"
như thế này:Tại sao 'git commit' không lưu thay đổi của tôi?
> git commit -m "save arezzo files"
# On branch master
# 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: arezzo.txt
# modified: arezzo.jsp
#
no changes added to commit (use "git add" and/or "git commit -a")
Nhưng sau đó, khi tôi làm git status
nó cho thấy các tập tin cùng chỉnh sửa:
> git status
# On branch master
# 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: arezzo.txt
# modified: arezzo.jsp
#
no changes added to commit (use "git add" and/or "git commit -a")
Tôi đang làm gì sai?
Sử dụng 'git commit -am 'lưu các tệp arezzo" 'để tự động thêm tất cả các thay đổi (w.r.t.ggignign). Bạn có thể chỉ muốn thêm các tệp/dir cụ thể: 'git add file.src' – mbx
Có thể trùng lặp: http://stackoverflow.com/questions/2419249/git-commit-all-the-files-using-single-cmd http : //stackoverflow.com/questions/4571106/git-commit-all-files – mbx