What we are doing: Below is a step by step guide on the process of using GitHub Desktop to complete a ticket in CDS.
First things first we have to make sure that our local repo(repository) is up to date. Click ‘Fetch origin’ to check for any changes.
If there are any changes this button will update to ‘Pull origin’ with the number of changes. Click ‘Pull origin’ to update your local repo with the changes.
Now that your local repo is up to date we can begin working. We have the ticket CIT-238 to work on.
Click the dropdown to view the available branches.
We will be creating a new branch for this ticket, and we will give it the ticket number “CIT-238”. Then click the “New branch” button.
A box will appear to create the branch. ALWAYS make sure that the new branch is based on the “main” branch. This will cause issues if the new branch is based off of anything other than “main”. Then click “Create branch”.
After the clicking create branch the branch has only been created locally on your machine. The same area that used to say “Fetch origin” will update to “Publish branch”. Click this to publish the branch to GitHub where it will then become available to everyone with access to the repo.
After publishing the branch you are now free to make the required changes for the ticket. Here you can see what has been changed in the files you have been working on.
Once you are done with your changes you can enter a title and description for your changes. After entering that information you can commit your changes by clicking the “Commit to {Branch Name}“ button.
You will see a message like below confirming your changes have been committed to the branch.
Next you will need to push your commit to github. You can make multiple commits before pushing, but it is best to keep the repo as updated as possible.
If you are all done with any changes needed for the ticket; you can now create a Pull Request(PR). Click the “Preview Pull Request” button.
A Pull Request let’s everyone in the repo know that the branch you have been working on is ready to be merged with the main branch. This gives us time for discussion if necessary, as well as time to review the changes.
A window will appear that shows the changes from all the commits to this branch. If everything looks good click the “Create pull request” button.
A browser window will now open in GitHub. This is the time to add any more information or comments about the changes made for the ticket. Once you are done adding anything you can click the “Create pull request” button. This will officially create the PR.
You are now done with the process, and free to move onto to the next ticket/task.
This next section is what the reviewers(Abhi or Tyler) of the pull request will do to finalise the changes.
We will be merging the ticket branch into the main branch.
This box will appear showing any conflicts with the main branch. Conflicts appear when people make different changes to the same line of the same file, or when one person edits a file and another person deletes the same file.
All conflicts
must
be resolved before merging the branches. With no conflicts we are free to click the “Merge pull request” button.
Here we can give a name and description to the merge. Next click the “Confirm merge”.
After that there will be a confirmation message letting us know that the Pull request merged successfully.
This is the end of the road for any ticket that goes through the system. We have now completed the ticket, and it is live on the server.
Comments
0 comments
Please sign in to leave a comment.