Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git not pushing all files within folder

Tags:

git

github

I'm trying to add, commit and push all folders and files to a branch, I have tried :

git add -A
git commit -m "version7"
git push origin develop

and

git add .
git commit -m "version7"
git push origin develop

and

git add *
git commit -m "version7"
git push origin develop

But it's not pushing every single file I have in my local folders. What could be wrong? I have checked that nothing is ignored too.

like image 447
user1937021 Avatar asked Jul 26 '26 05:07

user1937021


1 Answers

See if your files are being ignored by using git-check-ignore:

$ git check-ignore /c/your/directory/your_file.txt

If there is output there in the form of the analyzed file, then that file is effectively being ignored. If there is no output, then in that case the file is not matching an ignore pattern.

Something I personally find helpful with git-check-ignore is to specify --verbose so that you can see which gitignore is causing the matching entry (i.e. global or local to the repo), as well as the pattern that is actually matching the ignore specification. Also specifying -n will give you non-matching entries as well (instead of the "blank"), so that you can visually see and verify that there is no match to an ignore specification.

$ git check-ignore /c/your/directory/your_file.txt --verbose -n

A non-matching file (not-ignored file) would show this:

::      C:/your/directory/your_file.txt

A matching file (ignored file) would show like this:

.gitignore:1:*.txt     C:/your/directory/your_file.txt

The verbosity here shows the local .gitignore, the line number in the file, as well as the pattern matching the ignore specification (in this case, the pattern is *.txt).

like image 176
Thomas Stringer Avatar answered Jul 27 '26 18:07

Thomas Stringer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!