开发者

Github: I can't push ALL my files

开发者 https://www.devze.com 2023-02-07 16:48 出处:网络
I\'m new to all of that Git and Github, and I\'m really angry because i can\'t get it to work :P and I have read ALOT how to do... But it only pushes 1 file and I have 1 file and 2 maps.

I'm new to all of that Git and Github, and I'm really angry because i can't get it to work :P and I have read ALOT how to do... But it only pushes 1 file and I have 1 file and 2 maps.

What I'm doing wrong here:

Simon-jensens-MacBook-Pro:github simonjensen$ git add .
Simon-jensens-MacBook-Pro:github simonjensen$ git commit -m 'first commit'
[master (root-commit) 82ae76d] first commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 index.php
Simon-jensens-MacBook-Pro:github simonjensen$ git remote add origin git@github.com:SimonJ/test.git
Simon-jensens-MacBook-Pro:github simonjensen$ git push origin master
Coun开发者_高级运维ting objects: 3, done.
Writing objects: 100% (3/3), 236 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@github.com:SimonJ/test.git
 * [new branch]      master -> master
Simon-jensens-MacBook-Pro:github simonjensen$ 

https://github.com/SimonJ/test


I have no idea what the problem is; Git is clearly saying that you added 1 file, index.php, and that is precisely what shows up in Github. What did you expect to happen? (Specifically, what is a 'map'?)

Perhaps the source of your confusion is that you tried to add an empty directory. Because of some design decisions that Git (not Github) made, empty directories do not exist as far as git is concerned. If you try to add them, nothing will happen. If this is the case, just add an empty .gitkeep file to them or something like that, to make them addable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号