title: How can I move all git content one-level up in the folder hierarchy?
body: <p>I have a git repository whose structure looks like:</p>
  
  <pre><code>+--repo.git
  |
  +----+bootstrap.py
  +----+buildout.cfg
  +----+.gitignore
  +----+webapp
  |
  +---------+manage.py
  +---------+modules
  +---------+templates
  +---------+static
  +---------+...
  +---------+...
  </code></pre>
  
  <p>I would like to move the contents of the <code>webapp</code> folder one level up. My resulting repo should look like:</p>
  
  <pre><code>+--repo.git
  |
  +----+bootstrap.py
  +----+buildout.cfg
  +----+.gitignore
  +----+manage.py
  +----+modules
  +----+templates
  +----+static
  +----+...
  +----+...
  </code></pre>
  
  <p>Can I do this by simply moving all the files of the <code>webapp</code> directory one level up, deleting the empty <code>webapp</code> directory and then committing the changes? Would this preserve the commit history of the files under the <code>webapp</code> directory?</p>
  
  <p>Although a very simple question for many of you, I'd like to be sure. The last thing I'd want is a git soup.</p>
  
  <hr>
  
  <p>I tried moving the files but I lost the commit history as git doesn't really handle a move or a rename. I do know that even though it shows up as a new file in the logs, it is still possible to view the commit history for the file using some options in <code>git log</code>.</p>
  
  <p>From what I've read, the best way to accomplish this would be using <code>git-filter</code>. I'm not very good with shell or git so could someone tell me what I'd need to execute to do the aforementioned. </p>