title: Git add folder and push
body: <p>Currently I have those files in remote repository:</p>
  
  <pre><code>README 
  run.bat 
  MyCalories2 &lt;-FOLDER THAT IS EMPTY BUT NEED TO HAVE PROJECT FILES
  </code></pre>
  
  <p>The problem is that MyCalories2 is a folder and none of the files are saved in repo.
  I tried with <code>git add .</code> and also tried adding this folder from SourceTree but they are simply never uploaded to the remote repo.</p>
  
  <pre><code>$ git add .
  $ git push -u origin master
  Branch master set up to track remote branch master from origin.
  Everything up-to-date
  </code></pre>
  
  <p>but its not ! How do I add the complete folder to git ?</p>
  
  <pre><code> ~/Dropbox/AndroidStudioProjects/test/xxx (master|MERGING)
  $ git push -u origin master
  Username for 'http://git.yyy.com': xxx
  Password for 'http://yyy.com':
  To http://git.yyy.git
   ! [rejected]        master -&gt; master (non-fast-forward)
  error: failed to push some refs to 'http://yyy.git'
  hint: Updates were rejected because the tip of your current branch is behind
  hint: its remote counterpart. Integrate the remote changes (e.g.
  hint: 'git pull ...') before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
  </code></pre>
  
  <p>This is latest error msg. real URLs are masked with 'yyy'</p>
  
  <p><strong>@Marcus I tried all of these commands</strong></p>
  
  <pre><code>ls -la . MyCalories2
  
  MyCalories2:
  total 15
  drwxr-xr-x    1 Jalle    Administ     4096 Jul 25 21:46 .
  drwxr-xr-x    1 Jalle    Administ     4096 Jul 25 21:49 ..
  -rw-r--r--    1 Jalle    Administ       64 Jul 16 19:59 .gitignore
  drwxr-xr-x    3 Jalle    Administ        0 Jul 25 14:37 .gradle
  drwxr-xr-x   15 Jalle    Administ     4096 Jul 25 21:51 .idea
  -rw-r--r--    1 Jalle    Administ      870 Jul 16 20:01 MyCalories2.iml
  drwxr-xr-x    1 Jalle    Administ     4096 Jul 25 21:24 app
  drwxr-xr-x    3 Jalle    Administ        0 Jul 25 14:37 build
  -rw-r--r--    1 Jalle    Administ      452 Jul 24 21:33 build.gradle
  drwxr-xr-x    3 Jalle    Administ        0 Jul 25 14:37 gradle
  -rw-r--r--    1 Jalle    Administ      870 Jul 16 19:59 gradle.properties
  -rwxr-xr-x    1 Jalle    Administ     5080 Jul 16 19:59 gradlew
  -rwxr-xr-x    1 Jalle    Administ     2404 Jul 16 19:59 gradlew.bat
  -rw-r--r--    1 Jalle    Administ      435 Jul 16 19:59 local.properties
  drwxr-xr-x    5 Jalle    Administ        0 Jul 25 14:37 parseproj
  -rw-r--r--    1 Jalle    Administ       16 Jul 16 19:59 settings.gradle
  
  
  $ git --version
  git version 1.9.4.msysgit.0
  
  $ git pull
  U       MyCalories2
  M       run.bat
  Pull is not possible because you have unmerged files.
  Please, fix them up in the work tree, and then use 'git add/rm &lt;file&gt;'
  as appropriate to mark resolution, or use 'git commit -a'.
  
  $ git mergetool
  Merging:
  MyCalories2
  
  Submodule merge conflict for 'MyCalories2':
    {local}: deleted
    {remote}: submodule commit 4bf1b974662b5b694f985ee93401227262fd3f26
  Use (l)ocal or (r)emote, or (a)bort? l
  
  
  $ git push -u origin master
  Username for 'http://yyy.com': yyy
  Password for 'http://yyy.com':
  Counting objects: 245, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (215/215), done.
  efrror: RPC failed; result=22, HTTP code = 4136.00 KiB/s
  Watal: The remote end hung up unexpectedly
  Writing objects: 100% (243/243), 1.29 MiB | 136.00 KiB/s, done.
  Total 243 (delta 99), reused 0 (delta 0)
  fatal: The remote end hung up unexpectedly
  Everything up-to-date
  </code></pre>
  
  <p>But why this error ?!?!</p>
  
  <p><strong>Any help, please ?  I am stuck here !</strong></p>
  
  <p>and finally here is my config file</p>
  
  <pre><code>[core]
      repositoryformatversion = 0
      filemode = false
      bare = false
      logallrefupdates = true
      symlinks = false
      ignorecase = true
      hideDotFiles = dotGitOnly
  [remote "origin"]
      url = http://git.yyy.com/My-Name/My-Name.git
      fetch = +refs/heads/*:refs/remotes/origin/*
  [http]
      postBuffer = 524288000
  [remote "ssh"]
      url = My-Name@yyy.com:My-Name/My-Name.git
      fetch = +refs/heads/*:refs/remotes/ssh/*
      pushurl = My-Name@yyy.com:My-Name/My-Name.git
  </code></pre>