解决git提交本地删除的文件到远程分支的问题

2018-06-15  本文已影响12人  腿长袖子短
$ git status
On branch wjd
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        deleted:    public/sql_conn.php
$ git add public/sql_conn.php
fatal: pathspec 'public/sql_conn.php' did not match any files
$ git reset HEAD public/sql_conn.php
Unstaged changes after reset:
D       public/sql_conn.php
$ git status
On branch wjd
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        deleted:    public/sql_conn.php

no changes added to commit (use "git add" and/or "git commit -a")

总结:

上一篇 下一篇

猜你喜欢

热点阅读