Howto use git with a server?
-
I have a server (Linux, Debian) and my client (Windows). Currently I just copy my files over ssh to the server. Now I want to be cool and use git. I am trying this for a long time now and I am not sure what my question is. I created repositories on server and client. Commited my files but failed to push/pull/clone with IDE/GUI/console. Finally I managed to clone from command line. Just to find out that push does still not work. Do I need a bare repository? Looks like bare repositories don't have any files so I need two repositories an my server? Do I have to make a manual checkout on the server every time? I thought I can just push it there...
-
Answer:
The git community documentation extensively explains how to use a remote repository over ssh and how to set one up you should read the documentation. http://book.git-scm.com/4_setting_up_a_private_repository.html
PiTheNumber at Stack Overflow Visit the source
Other answers
Make sure you have correctly added "remote" if not then use "git add remote" command. Another possibility is that ssh keys. Make sure you have correctly configured ssh keys.
vpatil
You are not able to push in a non-bare repository in specific situations: A non-bare repository has always a working copy to work on. Let's assume the working copy is based on master. If you now want to push into master from another repository, git cannot push theses changes into the master, because the working copy bases on it. That's why you should use a bare repository: A bare repository is very small and easy to use, because you can push in it without any merging and checkout.
furtelwart
Related Q & A:
- How to upload the image to a server in Android PhoneGap?Best solution by Stack Overflow
- How to clone git to a server?Best solution by Stack Overflow
- How do I set up windows 03 server as a server?Best solution by Yahoo! Answers
- What is the different between a computer and a server?Best solution by Yahoo! Answers
- Should I start out as a server at a restaurant?Best solution by ehow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.