Is there a git repo at ~/mysite.com on your remote server? If so, like James and Noufal noted, be careful, this sort of nesting can be problematic.
Consider the following solution that should work whether it's nested or not:
- Create the my-awesome-app repo outside of ~/mysite.com (say at ~/my-awesome-app).
- Then create a symbolic link from ~/my-awesome-app/ to ~/mysite.com/my-awesome-app.
- And, to be safe, add ~/mysite.com/my-awesome-app/ to the ~/mysite.com/.gitignore file to exclude it from actions of the ~/mysite.com/ repo.
On the remote server, from shell:
mkdir ~/my-awesome-app/
ln -s ~/my-awesome-app/ ~/mysite.com/my-awesome-app
echo /my-awesome-app >> ~/mysite.com/.gitignore
When releasing commits from the local my-awesome-app branch to the remote server, I would use the path ~/my-awesome-app as the upload/relative directory rather than ~/mysite.com/my-awesome-app. This should save you from some cheeky IDE that tries to ascend the file structure looking for git repos.
Lastly, I would consider adding a remote repo at ~/my-awesome-app and not just sending file there via sftp/ftp or ssh without a repoo. This allows you to maintain a highly stable production environment while still being able to incoporate hotfixes back into your local dev copy using the scalable gitflow method.
There's a good discussion on gitflow by Vincent Driessen here.
Update: Alternative approach to symbolic link
Instead of a symbolic link (which has the potential to be deleted), you could make the changes to your site's config instead:
# creates the alias
<IfModule mod_alias.c>
Alias /my-awesome-app /path/to/my-awesome-app/
</IfModule>
# allows people to access the path
<Directory /path/to/my-awesome-app/>
Order allow,deny
Allow from all
</Directory>
Then when you do pushes, you should use /path/to/my-awesome-app/. I would still leave the /my-awesome-app line in ~/mysite.com/.gitignore just to be safe but without a symbolic link, git should never stumble accross the my-awesome-app repo at when acting on ~/mysite.com/.