I apologize if this is a newbie question, but I've been search around and I'm dumbfounded as to why this is.
I have some files I'd like to add and commit.
I run:
git add .
I also tried git add -A
, git add -f -A
git commit -m 'message'
git log --graph --decorate --pretty=oneline --abbrev-commit master origin/master temp
(to make sure my master branch is on the latest commit)
git push origin master
Yet there are no changes. The push was successful. But the files are not being added to my repository. What could be the reason?
EDIT:
I should mention that Git doesn't seem to be detecting new files. When I specify the exact file to add, such as git add myapp/newFile.html
. I get an error message fatal: pathspec 'myapp/newFile.html' did not match any files.
The file is clearly in the folder.
EDIT 2:
I tried re-making my folder with rm -rf .git
and then re-doing all the steps. But when I do git add -A
again, the new files are still not being added! My folder feels like it's cursed or something.
EDIT 3:
Results from ls -la
drwxr-xr-x 0 valachio valachio 512 Jan 11 20:35 .
drwxr-xr-x 0 valachio valachio 512 Jan 11 20:17 ..
drwxr-xr-x 0 valachio valachio 512 Jan 11 19:43 bungol
drwxrwxrwx 0 valachio valachio 512 Jan 11 19:43 config
drwxrwxrwx 0 valachio valachio 512 Jan 11 20:41 .git
-rwxrwxrwx 1 valachio valachio 804 Jan 11 19:43 manage.py
drwxrwxrwx 0 valachio valachio 512 Jan 11 19:43 misc (non-coding related stuff)
-rwxrwxrwx 1 valachio valachio 327 Jan 11 19:15 Pipfile
-rwxrwxrwx 1 valachio valachio 13798 Jan 11 19:43 Pipfile.lock
-rwxrwxrwx 1 valachio valachio 38 Jan 11 19:15 Procfile
-rwxrwxrwx 1 valachio valachio 115 Jan 11 20:08 README.md
-rwxrwxrwx 1 valachio valachio 368 Jan 11 19:43 requirements.txt
-rwxrwxrwx 1 valachio valachio 12 Jan 11 19:43 runtime.txt
drwxr-xr-x 0 valachio valachio 512 Jan 11 19:43 staticfiles
Results from git ls-tree HEAD
100755 blob a0994e0c2c674f7964b97e73bf8b639e0bd15fa3 Pipfile
100755 blob 79baf37feb267b9479d4b8979623e9164d8d17c3 Pipfile.lock
100755 blob 2a05d1701bb03f8e565ccb53b5048a2ecbb8ea81 Procfile
100755 blob 0fa4a27c2e5a6e03c3edf2eb096766c20c0e9206 README.md
040000 tree c1179776614cf441fd04a5241b91869e3b24a776 bungol
040000 tree 8f0028f91df90b5124315f5e1cdd776c55fe2300 config
100755 blob 68141ee9e00d47db18f3598190234e8f8818dd5d manage.py
040000 tree 4209dc1c056f595660ebf39ed57dc5bf72841597 misc (non-coding related stuff)
100755 blob d108cb2bdc916228474253e8c014dd1944df27f2 requirements.txt
100755 blob 5f61493782f81ae7c642d97051a8be79da5b7dba runtime.txt
040000 tree a044a50441ede0a7718934b096f3c11ef4e5c2ae staticfiles
EDIT 4:
I found the problem. I am using Ubuntu and the new files did not have access permissions. I had to give the current user access permissions to those new files with chmod 755
and after that it works.
Sorry I didn't mention this in the original question. Thank you to everyone that provided answers.