R
R
ryzhak2014-02-27 17:06:55
git
ryzhak, 2014-02-27 17:06:55

How to organize work with git (transfer to the server)?

There is a web application with 2 master and dev branches on bitbucket, which after 3 months of development can already be published. We have our own server. Question: how to properly organize the work of several programmers and how to transfer files to the server? Is it possible to do this: stupidly copy all the php files and the .git folder and upload it to our server. And then, via ssh, cling to our server and do pull push, etc. But then you can forget about bitbucket.
But then another question: why do we need bare repositories then?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Litvinov, 2014-02-27
@ryzhak

Just do git cloneit with bitbucket You
can organize your work like this
782a1be3.pngRead

R
ryzhak, 2014-02-27
@ryzhak

As I understand it, there is:
a programmer with his local copy of the project with bitbucket - prog1
programmer prog2
our server - server
repository bitbucket - bibucket
What we do:
1. make a git clone of the project with bit bucket on our server
2. prog1 pushes a commit to bitbucket
3. prog2 pushes a commit to the bitbucket
4. on the server, do a git pull of the project from the bitbucket and rejoice
like that?

K
kompi, 2014-02-27
@kompi

A bare repository is a single .git folder with no working copy.
Those. in bitbucket you just have a bare repository.
If you try to push to a normal repository, then you will have a conflict, since you can overwrite the current state of the working copy of the repository (where you are pushing) with your changes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question