PHPz2017-04-22 09:01:42
我特意在 OSC 的网站上做了测试,发现是可以的,下面是我用的代码
详细的Repository可以见 http://git.oschina.net/redchamber/testproj
我分别在根目录和images目录下添加了jpg以及png文件,代码如下
git add images
git commit -m "Test"
git push
你的push失败,能否请贴出所使用的命令和相应的错误输出?在询问技术相关问题时,指出自己所用的操作系统,你做的很好,但是如果能贴出相应的命令和输出,则会对于其他人帮助你分析,定位和解决问题非常有帮助。
另外:我并不是OSC的人,我只是一个打酱油的网友 ^_^
liudeMacBook-Pro-3:testproj larry$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# test.jpg
# test.png
nothing added to commit but untracked files present (use "git add" to track)
liudeMacBook-Pro-3:testproj larry$ git add .
liudeMacBook-Pro-3:testproj larry$ git commit -m "Add image files for testing"
[master 49a8cd7] Add image files for testing
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test.jpg
create mode 100644 test.png
liudeMacBook-Pro-3:testproj larry$ git push
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 106.80 KiB | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://git.oschina.net/redchamber/testproj.git
85c1353..49a8cd7 master -> master
liudeMacBook-Pro-3:testproj larry$