Pushing your changes to GIT on VSTS

So we have created our first two code changes and you are now ready to commit them to git. My rule is to commit often as this gives you a much better granularity for figuring out when bugs are introduced to the code and then being about to revert just those small changesets.

To commit your changes select the VCS menu in IntelliJ and click on Commit.

You should see a dialog box similar to the one above which shows the two new classes you have added to your application. You can then fill in the commit message but before you actually commit these changes you should also associate them with your User Story in VSTS.

If you have installed the Visual Studio Team Services For IntelliJ IDEA Plugin then you will see an extra icon above the commit message box. Clicking on this will bring up a list of the all the active user stories in VSTS that are assigned to you.

Select the story that you are working on from the list and then click on OK and the commit message box will be updated.

You can now go ahead and commit these changes to git.

When you commit the changes you are only updating your local version of the git repository. To get the changes up to the VSTS server you will also need to push them. Normally I will push my changes up every few hours and always push at the end of the day so that I know they are safe on the server in case something were to happen my machine.

In IntelliJ go to the VCS –> Git –> Push menu option

You will see a list of all the commits that you are pushing to the server and at the top will be verification that you are pushing them from your local story branch to the server story branch. If you see ‘master’ as the local branch the you forgot to check out the story local branch before commiting and you should move the commits from the master branch to the local story branch before you continue.

Back over in VSTS you will be able to see your new code commits.

and on the Code –> Branches section in VSTS

You can see all your branches and how far ahead ( or behind ) they are with the master branch.

Advertisement
Tagged with: , ,
Posted in Domino To Spring, None
Archives
%d bloggers like this: