title: GIT: How to commit a change with .git folder already inside a working directory to that repository via batch command?
body: <p>Here's my current repository, and made it as my working directory.</p>
  
  <p><img src="https://i.stack.imgur.com/c7GSv.png" alt="enter image description here"></p>
  
  <p>As you can see, there's a BAT file, "backup.cmd" with the contents shown below:</p>
  
  <pre><code>"C:\Program Files (x86)\Git\bin\git.exe" add . &amp;&amp; "C:\Program Files (x86)\Git\bin\git.exe" commit -am "Periodic Backup %DATE%" 
  </code></pre>
  
  <p>Now, I am setting a task scheduler in Windows 7 that allows me to weekly create a backup to this repository. However, there's a problem when it comes to commiting changes in any of these files.</p>
  
  <p>The problem is that, by running the BAT file, Git is unable to commit changes. The cause for it unable to commit changes is because of the ".git" folder residing in the working directory.</p>
  
  <p>I have tried to use ".gitignore" and ".git/info/exclude" to ignore/exclude the ".git" directory, but it still fails to let me commit the changes. I do not know any other methods of ignoring/excluding  the ".git" directory.</p>
  
  <p>Can anyone help me on this? Thanks in advance.</p>