title: Pushing files to remote repository using jGit
body: <p>I need to programattically push files using jGit from different local repositories to one remote repository hosted on Github. The code below works with no exceptions, but nothing is being changed in Github.</p>
  
  <p>Every user defined 'group' in my program has its own folder under another folder called data. And every group folder contains a folder called repo, which contains an html and css file. When the time's right, I need to push these two files to github.</p>
  
  <p>Here's the structure of the folders:</p>
  
  <pre><code>program (folder)
       [reciter.jar]
       [start.bat]
       data (folder)
            &lt;group 1&gt; (group folder)
                 repo (group specific repository folder)
                      [resultsFile.html]
                      [styleFile.css]
            &lt;another group&gt; (group folder)
                 ... (omitted)
  </code></pre>
  
  <hr>
  
  <p>Here's what I need to do:
  I want make one repository one Github. (done: <a href="https://github.com/Skultrix/reciter.git" rel="nofollow noreferrer">https://github.com/Skultrix/reciter.git</a>) When a group pushes their files to Github, I need them to be in this order:</p>
  
  <pre><code>github's root
       &lt;group 1&gt;
            resultsFile.html
            styleFile.css
       &lt;another group&gt;
            resultsFile.html
            styleFile.css
  </code></pre>
  
  <p>Meaning, if I want to access "another group"'s html file, the path would be another_group/results.html.</p>
  
  <p>Here's what I have tried with jGit:</p>
  
  <pre><code>    public void load() {
          try {
              git = Git.init().setGitDir(group.getDataManager().getRepoDirectory()).call();
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
      //load() is always before sendFile()
      public void sendFile() {
          LoadingModal.showModal(main, () -&gt; {
              try {
                  System.out.println("adding");
                  git.add()
                          .addFilepattern("resultsFile.html")
                          .call();
                  System.out.println("commiting");
                  git.commit()
                          .setAll(true)
                          .setMessage("Update results")
                          .call();
                  System.out.println("remote adding");
                  git.remoteAdd()
                          .setName("origin")
                          .setUri(new URIish("https://github.com/Skultrix/reciter.git"))
                          .call();
                  System.out.println("pushing");
                  git.push()
                          .setRemote("https://github.com/Skultrix/reciter.git")
                          .setCredentialsProvider(
                                  new UsernamePasswordCredentialsProvider("skultrix", &lt;my password&gt;)
                          )
                          .call();
                  System.out.println("finish");
              } catch (Exception e) {
                  e.printStackTrace();
              }
          }, "Uploading results to site.", true).run();
      }
  </code></pre>
  
  <p>When the code above is executed (#sendFile) the console prints:</p>
  
  <pre><code>adding
  commiting
  remote adding
  pushing
  finish
  </code></pre>
  
  <p>But when I check github, nothing is changed, and not even empty commits are made. No exceptions or errors either.</p>
  
  <p>Thanks for any assistance or guidance in advance.</p>