Using GitHub during Sprints
How it all works
GitHub stores a master copy of your team's project on there website. When you want to work on the project you sync or pull newer versions of the project to your computer. Any changes you make to the code has to be uploaded or pushed to the GitHub repository through a process called Commit.
Step-By-Step
Before writing code
- Click "Sync" in the right-hand side of GitHub Desktop
- You will then see the button stating syncing and if something new was synced you will see the update.
Note: Anytime you want to start working on your project, make sure that you always have the newest version before coding. This is done by pulling or syncing any new code from GitHub.com to your local computer.
You have written code, and are ready to sync with your GitHub repository
- Launch GitHub Desktop if not already open
- In the top-center, click Uncommited Changes.
- This shows what you have changed, but haven't uploaded or pushed to your team repository.
- Click "Sync" again from the top right-hand side.
- Under the column that says "Changes", select the "Summary" input field and type a summary for your changes.
- If need additional space, click on "Description" to enter more details.
- Click "Commit to master"
- Click "Sync" again from the top right-hand side to finalize commit.
- If you go to your GitHub repository, you should now see your updates.
Note: You should always upload your code to your repository when you stop writing code for the day. It doesn't have to work, but make sure your code doesn't break the functionality of other people's code. I recommend looking into automated testing to help prevent broken code.
Suggestion: I recommend before continuing to notify your team that you are about to push your code. This helps avoid an issue called merge conflict. We will discuss this a little later.
Note: Before commiting it is best to click sync to make sure nothing new has been updated or changed from the repository.