无法更新Git repo

时间:2016-12-22 11:19:41

标签: git

Adam@Aderm MINGW64 ~/code/Test Server (master)  
$ git commit  
On branch master  
Your branch is up-to-date with 'origin/master'.  
Changes not staged for commit:
    modified:   .classpath
    modified:   bin/aderm/pw/testserver/Listeners/Join.class
    modified:   bin/aderm/pw/testserver/Main.class
    modified:   plugin.yml
    modified:   src/aderm/pw/testserver/Listeners/Join.java
    modified:   src/aderm/pw/testserver/Main.java

Untracked files:
    bin/aderm/pw/testserver/Commands/Heal.class
    bin/aderm/pw/testserver/Commands/Ping.class
    bin/aderm/pw/testserver/Listeners/BlockStuff.class
    bin/aderm/pw/testserver/Utils/
    src/aderm/pw/testserver/Commands/Heal.java
    src/aderm/pw/testserver/Commands/Ping.java
    src/aderm/pw/testserver/Listeners/BlockStuff.java
    src/aderm/pw/testserver/Utils/

no changes added to commit  

然而我已经在src文件中添加了代码/文件夹。

当我尝试git push -u origin master时:

Adam@Aderm MINGW64 ~/code/Test Server (master)
$ git push -u origin master
Branch master set up to track remote branch master from origin.
Everything up-to-date

1 个答案:

答案 0 :(得分:0)

  

然而我已经在src文件中添加了代码/文件夹。

首先需要git add该文件夹,以便它在git控制下

git add src

commitpush

之前
git commit -am "add src"
git push origin master
相关问题