I have a question regarding Git. The place where I work has 2 developers: myself and another guy. We both developing a VB.NET project using Visual Studio 2008 and all the code and the company documents are all stored in a central local server.
So at the moment if both of us have to work on the same project we copy the code stored in Server1:/Code
to our local documents folder and just tell each other what files we are using so we are not working on the same files. At the end of the day we copy our bits back to the server (making sure I don't override his files and vice versa).
I have looked into Git and it seems that it will solve this "Don't change the code of FileA because I am using it" type of problem and will enable us to work on the same project at the same time: i.e we both get a copy of the code from Server1 and develop and we merge both at the end of the day back to the server (or am I wrong?).
Now I have read parts of ProGit book and I get the bit where you add files and do commits but am not sure how both of us will be able to use it at once.
A few questions here:
- Where will I create the Git repository? The code is stored in
Server1/Code
and inCode
we have various projects so I guess I have to create the repository inServer1/Code
? - After I create the repository, how do we both get a copy of, say project
A
stored inServer1/Code/ProjectA
? Will we just copy paste the folder or use Git? - Because each of us will have our own copy in
My Documents
and work on that copy throughout the day, how will we merge the files at the end so that nothing gets lost? Let's say I have created a new Form in VS2008 with a button and some code behind it and the other guy has changed some code somewhere else? Or for example, I add some code to FormA and he adds some code to FormA too? How do we merge them at the end?
As I said I have installed git and git extensions on my pc at home and had a play with it and do not mind using either git bash (command line) or git GUI.
Any help will be greatly appreciated guys.