Using Git as source control provider


1. Get repository from remote repository. Right click on a directory location which wanted to make as working directory. Select Git Clone option from the context menu.

clip_image002

 

2. To get project from remote repository, provide the URL into the URL field.

 

clip_image004

 

3. Start downloading the remote repository.

clip_image006

 

4. Now open the project with visual studio. To work visual studio with git, another tool Git Source Control Provider is needed to install.

 

clip_image008

 

5. Follow the steps provided in the picture to download and install Git Source Control Provider.

clip_image010

clip_image012

 

6. After installation make Git Source Control Provider as default source control plug in.

clip_image014

 

7. Now the project is controllable from visual studio.

clip_image016

clip_image018

 

8. Right click on project, context menu shows TortoiseGit and Git Extension related commands to control project.

clip_image020

 

9. To add local changes into local repository, use any of the Commits either from GitExtensions\TortoiseGit.

clip_image022

 

10. To add local changes/local branches to Remote repository/Server, use Push command.

clip_image024

 

11. After applying Push command a dialog opens asking the remote branch name, to which the local changes would be applied.

clip_image026

 

12. To get latest from server (Merge local changes with server branch).

clip_image028

clip_image030

13. Checkout Branch à Can be also used to take latest version from both local/Remote repository.

clip_image032

clip_image034

 

14. Now suppose you worked on an issue, but want to commit and push it in a branch for future use.

 

clip_image036

clip_image038

clip_image040

 

15. After pushing you want to continue work on master.

clip_image042

clip_image044

 

16. Started working on master. Now decision taken to implement Issue-383. And move away the changes that you made on master. To move the changes use stash (stash is like a branch, it saves the changes in a separate place).

clip_image046

clip_image047

Advertisements

Git configuration/Installation on Windows


 

1. Install Git Extensions, It would provide options to install MsysGit(git for windows) and KDiff(merege tool).

clip_image002

 

2. During installation it would prompt GuI to install KDiff.Complete the installation.

 

clip_image004

 

3. Then it would also prompt to install msysGit. Complete the installation.

clip_image006

 

4. Now check GitExtension Settings.

clip_image008

 

clip_image010

 

5. If any of the settings in the above picture shown as red text with repair then fix these settings.

6. Now set the Global Settings and Local Settings.

clip_image012

 

7. Now install TortoiseGit.

 

clip_image014

 

8. Check TortoiseGit–à Settings.

clip_image016

 

9. Set Git credentials.

clip_image018

clip_image020

 

10. Installation is completed. Now it is time to use Git as a source control provider.