Pushing a local git repo to another online git repos (like github)

I have a repo on my computer that I want to push to a test environment online, so on my online server I installed git, created a repo and everything,

I can currently push to the repo and it work, but.. I can't find my applications files, there is only git files in the folder, what do I need to do to get my test environment working where I can push to it.

Answers


Nominally, the right way to do this in Git is to push your code to a stable location (e.g., github) and then have the online server "pull" from that location.

When you push in Git, git does not update the working tree, only the repository history. By default, you are even prevented from pushing to a repository with a working directory (whose HEAD matches the branch you are pushing to).

However, it is certainly possible to configure Git to allow you to do something like what you want. See http://toroid.org/ams/git-website-howto for details on how to configure an external work-tree and post-receive-hook to automatically update that external work tree when you push.

You might also want to use a tool like Capistrano http://help.github.com/capistrano/ to help you with the deploy.


Need Your Help

C++ std::list<T>::iterator Does the iterator have acces to <T> member functions?

c++ iterator stdlist

This is my first time posting here at SO, but I've been utilizing the answers and help here for a while now.

Solr range faceting on a date field

solr solrj date-range faceted-search solr4

I need to apply a range facet to a date field. But the gaps should be in minute intervals, like /10MIN. Solr uses DateMathParser to parse given gaps and unfortunately it does not support minute int...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.