For some reason, I am getting "modified file" which I haven't even touched. git stash doesn't work either. As a result, I am unable to update my fork.
git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
1. git checkout -- Fails
$ git checkout -- api/gluon/mxnet.gluon.Parameter.rst
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
2. git reset --hard Fails
$ git reset --hard HEAD
HEAD is now at ae587f3 add data.md
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
3. Add followed by reset Fails
$ git add api/gluon/mxnet.gluon.parameter.rst
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: api/gluon/mxnet.gluon.parameter.rst
$ git reset --hard
HEAD is now at ae587f3 add data.md
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
4. git stash Fails
$ git stash
Saved working directory and index state WIP on master: ae587f3 add data.md
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
5. git stash --all Fails
$ git stash --all
Saved working directory and index state WIP on master: ae587f3 add data.md
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
6. git stash drop Fails
$ git stash
Saved working directory and index state WIP on master: ae587f3 add data.md
$ git stash drop
Dropped refs/stash@{0} (b907d78e21da17b0ea4a3dfe9f03e053e46be23f)
$ git status
On branch master
Your branch is up to date with 'origin/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: api/gluon/mxnet.gluon.parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
7. git checkout . Fails
$ git checkout .
$ git status
On branch master
Your branch is behind 'origin/master' by 302 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
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: api/gluon/mxnet.gluon.Parameter.rst
no changes added to commit (use "git add" and/or "git commit -a")
I'm guessing it is more of Git issue (but still unable to resolve it using Google help!
Unable to sync my fork with upstream master
For some reason, I am getting "modified file" which I haven't even touched.
git stash
doesn't work either. As a result, I am unable to update my fork.1.
git checkout --
Fails2.
git reset --hard
Fails3. Add followed by reset Fails
4.
git stash
Fails5.
git stash --all
Fails6.
git stash drop
Fails7.
git checkout .
FailsI'm guessing it is more of Git issue (but still unable to resolve it using Google help!