A
A
Ang55452014-10-24 12:13:43
Java
Ang5545, 2014-10-24 12:13:43

How to create a git repository under Eclipse on a remote server?

Good day.
There is a server that I go to with shh and use files from my home directory. All colleagues have access to the server.
I have a local repository with a java project in Eclipse. How can I put the repository on the server, for sharing / editing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nerro, 2014-10-29
@nerro

The official tutorial for setting up Git on the server is here .
When creating a new repository:
1) create a bare repository on the server
2) initialize the repository on the client (if there is a local one, then skip this step)
3) then create a link as Viktor answered (git remote add origin repo-url )
4) send changes to server (git push origin -u branch-name )
PS the -u switch will create a link to the branch in .git/config and allow later git pull/push without additional arguments.

V
Viktor Koltcov, 2014-10-24
@Vityarik

if I'm not confusing
anything then this
git remote add origin link to the repository
will create a link to the remote repository
git push origin [branch name]
will send to the remote repository

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question