-5

So I am currently working on a project with another developer having up this point always developed on my own and never used any form of version control.

In order to understand if Git is the tool we really need, I'd like to know if there is a way to see what file they are working on without asking them every time so we don't end up writing over each others code. Is that possible or is there another tool for that?

Basically, what is the best flow for me to work with another developer on the same project?

Tenatious
  • 849
  • 4
  • 12
  • 32
  • 3
    I downvoted this question because the "is it the way forward" matter is definitely subjective. Please remove that part of the question or rephrase it so that it doesn't start flame wars over version control systems. – Giulio Franco Sep 07 '14 at 10:11

2 Answers2

1

is Git the way forward for me to collaborate with another developer?

A distributed version control system is a way to collaborate without having to be connected to a server all the time: each gets the full history of a repo.

Is there a way to know what file they are working on without asking them every time so we don't end up writing over each others code?

No, that remains a communication issue, not a feature from a distributed tool, which has no locking mechanism.
The idea is to pull--rebase first (rebasing one's local work on top of the latest from the other repo), resolve any conflict locally, and then push.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Is the best way to do it then to have the main repo and for each of us to have our own branch? Or just one branch between the two of us? Then we push to that branch and once we know it's all fine and dandy push it to the main? – Tenatious Sep 07 '14 at 10:12
  • 1
    @Tenatious you can isolate your work in a branch, but if you both are working on the same feature, then it is actually best to merge as often as possible: one branch is enough. – VonC Sep 07 '14 at 10:13
  • @Tenatious see also http://stackoverflow.com/a/2705286/6309 – VonC Sep 07 '14 at 10:14
0

Version control systems are not managing your work. They allow developers to edit the same file, and then merging the differences, and they keep an history of all these changes, with attached log messages.

The issue of determining who does what is a management and communication issue. There are tools to help with this (task management platforms or issue tracking systems). But the main point is that 50% of a developer's work is to communicate with other developers. Even if a system just prevented the other parties from modifying your file, you'd just fight like "who locks the file first wins" if you don't coordinate your work.

Giulio Franco
  • 3,170
  • 15
  • 18