2

I have some new files in a new commit. I used:

git add . --all (I also tried git add --all)

to add the files, then:

git commit

to commit them, then I used:

git push origin master

to push them and everything went fine without error. However, upon logging on to my git server and listing the files with:

git ls-tree --full-tree -r HEAD

, certain important files are missing.

Also doing:

git pull origin master

On another machine seems to run fine without error, but those same files are missing.

2
  • after "git add --all" do a "git status" and see what files have been added for commit. If the files you want aren't added then they are probably in your .gitignore file. Commented May 22, 2015 at 3:12
  • Formatting note: Indent your commands with four spaces, rather than surrounding them with back ticks, if they're on their own line. Commented May 22, 2015 at 3:56

1 Answer 1

4

One common reason why files would be skipped is that they are in your .gitignore file. Check to make sure you aren't ignoring these file types, or the folders they are in.

Sign up to request clarification or add additional context in comments.

1 Comment

That was why indeed. The issue was I didn't realize there were a bunch of .gitignore files in the repository, not just in the root directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.