I am simply a user of git and not an admin. I recently cloned a project into an empty directory. Once I clone it, I notice that there already are unstaged modification.
Here are the steps in the order that I execute.
1 - Create an empty directory
# mkdir /tmp/my-git-folder ; cd /tmp/my-git-folder
2 - Clone a project in the new EMPTY directory.
# git clone ssh://git@server.com:8011/foo/bar.git
Cloning into 'bar'...
remote: Counting objects: 32736, done.
remote: Compressing objects: 100% (9759/9759), done.
remote: Total 32736 (delta 20650), reused 31854 (delta 20171)
Receiving objects: 100% (32736/32736), 5.14 MiB | 815.00 KiB/s, done.
Resolving deltas: 100% (20650/20650), done.
Now this should be a fresh copy with no changes at all. But when I do a git status , this is the result.
3 - Check 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: some-folder/ansible-tasks.yml
no changes added to commit (use "git add" and/or "git commit -a")
But I never made any changes what so ever. I tried to do a clean as well as a reset. But this change does not go away and I cannot have a clean copy.
# git checkout .
# 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: some-folder/ansible-tasks.yml
no changes added to commit (use "git add" and/or "git commit -a")
# git reset
Unstaged changes after reset:
M some-folder/ansible-tasks.yml
# git clean -f
# 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: some-folder/ansible-tasks.yml
no changes added to commit (use "git add" and/or "git commit -a")
Any help would be appreciated since Im out of ideas as to what is wrong here.