title: Is there a way to create a .ipynb from a .py file command line?
body: <p>Is there a way to create a .ipynb from a .py file command line?</p>
  
  <p>Why I would want to do this: I want to refactore some code using a text editor. My ipynb file is on a server, and it is way easier to transfer a .py file (generated by running ipython notebook with --script) that is tracked on a version control system (git) than ipynb.</p>
  
  <p>Ideally I want to do the following:</p>
  
  <ul>
  <li>the Notebook is running with <code>--script</code>, so I have a .py file</li>
  <li>commit the new version of the file, push from the server and pull on my machine</li>
  <li>pull from my machine</li>
  <li>edit on my machine</li>
  <li>commit, push from my machine and pull from the server</li>
  <li>create the .ipynb file from the new .py file and replace the old one</li>
  </ul>
  
  <p>And I can't find any way to start on the server an iPython Notebook from a py file that is on the server.</p>
  
  <p>Sure, I can add the .ipynb to git, but there are good reasons not to do that. I could also send files using ftps, but since it is something I do rather often I'd like to find a better solution.</p>