by Angel Leon. March 17, 2015;
Last update on December 14, 2023
Updated on February 27, 2023
Updated August 29, 2019.
Let's say you start a project locally, and do some editing.
$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILE
Now you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly: