-
Notifications
You must be signed in to change notification settings - Fork 25
GitHub from Visual Studio 2015
Each collaborator will work on a project, which will have issues (they may be bugs or features to be added) and notes (which are more generic descriptions of a feature). These tasks need to be done before the project is finished and they will be moved in the project from "TODO" to "In progress", then to "Testing", then to "Finished". Going from "Testing" to "In progress" is, of course, an option. Issues may be assigned to a certain collaborator or the may be marked as help-wanted.
These issues will be named using the following convention: first the name of the application the issue belongs to, a colon, and then, a short description. For example: "Badger: add a button in the report viewer to save all the reports". Inside the issue, a description will be added. Before starting on an issue, the collaborator will assign (if it has not already been assigned by the project owner) it to himself, letting the rest of collaborators know who is working on what.
Each task (issue/feature) will be done in branch off the "develop" branch. The name of the branch may be a very short description of its goal (i.e, "badger-add-save-button") if more than one person is going to work on it, or include the assignee's name before the description (i.e, "dan-simmons-badger-add-save-button"). When a feature is finished (after testing the feature itself and making sure all the projects within the solution compile), then the feature's branch is merged with the "develop" branch (Team explorer->select develop branch->merge from->{my branch}). More info on how to use branches can be found here.
Connections to repositories and code versioning is done in the Team Explorer tab (View/Team Explorer). Use the arrows in upper left corner to navigate the different views: Changes, Sync, ...
First, we need to download a copy of the remote repository. This copy will have a reference to the remote server so that both repositories can be synchronized later. We can clone the repository from github.com using a web client:
or using Visual Studio\Team Explorer:
After cloning it, we can open the solution file (.sln) and browse the source code.
A branch is an isolated version of the copy where we can program without interfering with other developers. The main branch is called _main. We only want stable versions of the code in this branch, those which can be downloaded in GitHub/Releases. From this main branch hangs the development branch (develop), where we only should have versions of the code that compile correctly. Instead of working directly on this branch, each developer will create its own branch hanging from develop, where the developer can work on a feature. When the feature is finished (please compile all the projects and run all the tests), the branch can be merged back with develop.
To create our own branch in Visual Studio:
If we want others to see your work or let others test what you are doing, publish your branch (right-click->publish branch). From now on, your branch will be visible in GitHub.com:
After creating our own branch, we start making changes to the code. Then, after some time, we will want to commit our changes. We commit our changes ("Commit All")against the local repository providing a description of what we have done:
Note: commit changes often, since we will only be able to go back to committed code. Uncommitted code won't be available anymore.
Whenever we want to upload our changes to the server and download remote changes (remote changes should be in a different branch most of the time so they shouldn't interfere with our work) we sync repositories:
Note: we can't have uncommitted changes before syncing. We can either commit them or undo them.
We can checkout the current state of any branch just by double-clicking it:
Note: we can't have uncommitted changes before checking out another branch. We can either commit them or undo them.
When we finish the feature we were working on it (for example: add a save button), we merge the changes committed to our branch to the parent branch (develop). Just double-click on develop and merge from your branch:

Whenever we synchronize or merge from our branch, we might have conflicts. Most of the times, conflicts arise when we have committed a change to a file, and this file has been modified on the parent branch after we created our branch off the main one. We'll get a message like this:
We have to resolve them. Click on Conflicts:
One by one we have to resolve all the conflicts. We basically have three options: take the remote copy, the local copy, or merge both:
If we are dealing with text files (code source files), we will usually want to merge both copies to make sure we don't undo something done by others our ourselves:
In the new window, the differences between both versions will be highlighted and we will have to choose which part from each file to keep (checking them). After we are done merging both, we click on Accept merge on the upper left corner.
Once we resolve all the conflicts
, we have to commit those changes we just did to merge both versions:













