Working collaboratively on Github and organizing tasks
March 31, 2024
A crucial aspect of any project is organizing tasks.
I am going to show you today the tools built in to Github for organizing tasks and workflows, and how they aid in working with others.
GitHub Issues are items you can create in a repository to plan, discuss and track work. - Github Docs
Issues are
They can be either
Issues for public projects can be opened by anyone (by default).
For private projects, only you and your collaborators can open an issue.
Each repository has an “Issues” tab.
We are going to follow along the Github Quickstart for Github Issues.
This will open an editor in your browser for the issue.
Issues have a title and description.
The description is rendered as markdowon, allowing you to add
This will be rendered as an interactive list that you can check-off as you complete the items.
Labels can be added to the right. Some are generated by default but you can add your own.
Milestones let you add a date-based target for completing this issue (or a set of issues).
Issues can be assigned to yourself or to other Github users working on the repository.
Issues can grouped together into projects, which we will look at soon.
A big benefit of issues the ability to continue commenting on open issues.
This allows discussion and clarification of the task, and progress reports.
Comments have all the same markdown styling options.
You might think that these issues look a lot like an email-thread you’ve had with an advisor or professor.
But there are big differences:
Email is not a task management system.
There are many other task management software (Asana, Wrike, Flow) if you don’t like Github.
Task management is most important when you are working with others.
This is true when collaborating
Or when you are the research assistant for a professor
And it remains crucial when you are working by yourself…
Treat yourself as your own RA - Camilla Adams (my friend)
This often means keeping a todo list on a piece of paper, or in a Word document. But using a task manager system is much more effective.
A project is an adaptable spreadsheet, task-board, and road map that integrates with your issues and pull requests on GitHub to help you plan and track your work effectively.
You can create and customize multiple views by filtering, sorting, grouping your issues and pull requests, visualize work with configurable charts, and add custom fields to track metadata specific to your team. - Github Docs
Projects are attached to your personal profile (not a repository).
The easiest way to add an issue to a project is when creating it.
You can use the same method to add issues that have already been opened to a project.
Once added, you can then fill out any additional custom fields.
From a project, you can create a “draft” issue.
You can write the description, set all of the custom fields, etc.
Then “convert” the draft issue to a real issue for a specific repository
Github Projects allow for custom automation as well.
I want to note that these are possible, but I don’t think you need to use them to have Github Projects be effective.
The major benefits of Github Projects:
Github Issues provide the basic tools needed to manage tasks.
Github Projects provides the advanced tools and the nice “visual” views.
Sometimes, Github Issues will be enough, but for any big research project, I recommend trying to use Github Projects too.
For any respository on Github, you can add collaborators.
Go to the repository’s “Settings”
then “Collaborators”
and add their Github username
As long as you and your collaborators are not editing the same files,
you can push and pull to same Github repository.
But if you and your collaborator have conflicting commits
then you will not be able to push to the repository without first resolving the conflict.
One way to solve an out of sync local repository is to…
The default “branch” is called “master” or “main”.
This is how you have been using Git repositories so far.
The default “branch” is called “master” or “main”.
This is how you have been using Git repositories so far.
“Branches” allow you to split your Github repository into two (or more) states, each with their own set of commits.
Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository. - Github Docs
Branches are like copying your entire repository to a new folder.
When you are happy with the state of branch, you will want to merge it back to the “main” repository.
Github calls this merge a “pull request”.
Pull requests let you tell others about changes you’ve pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch. - Github Docs
Once you have a branch that you want to merge back onto “main”,
Pull requests will
After a succesful pull request, you can delete the branch.
Branches are a tool and there are a lot of ways to use them in practice:
Branches complicate the flow of Git commits
but they have real benefits for working with others.
Personally, I have yet to find them that useful when working on my own.
With a classmate next to you…
Partner 1 creates a Github repository, adds Partner 2 as a collaborator
Both Partners clone the repository to their machines
Both Partners edit the Readme files (with different edits)
Both commit and try to push to Github
Using the same repository,
Both partners create a branch on Github
Both partners edit the readme file for your branch
Partner 1 submits a pull request, merge it onto “main”
Partner 2 submits a pull request, resolve the conflicts and then merge onto “main”