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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: