GitHub Project Management

Author

Lindsay Poirier

Exercise 1: Merge Conflicts in main

In this exercise, you will work through solving merge conflicts. To do this:

  1. Open your group repository on your local computer

  2. Swap your name with someone else’s in problem-definitions.qmd, without discussing it with your teammates

  3. Commit and push your changes

  4. Fix the merge conflicts by working with your team members

Exercise 2: Merge Conflicts across Branches

  1. Review recommended style guide headings at this link. Assign a section of the style-guide document to each member of your team.

  2. Each of you will then create your own branch.

  3. Each of you will add a section or a question related to the style guide on line 12 in the style-guide.qmd document in your respective branch.

  4. Commit and push your changes.

  5. Create a pull request to merge back into main. Collaborate with your team to address any merge conflicts, as you merge all changes.

  6. Delete your branches after all your changes have been merged.

Exercise 3: Formatting Messy R code

In this exercise, you will work on formatting the given R code according to some agreed upon style conventions.

  1. One team member will create an R script in the collaboration-docs folder in your group project repository and copy the following R code onto it. Commit and push your changes.
# loading libraries
library(tidyverse)
library(nycflights13) 

# Copy paste this code into the console if you don't have the nycflights13 package
# install.packages("nycflights13")

Mystery_dest <- flights %>% select(carrier, dest, origin) %>% group_by(dest) %>%
  summarise(`Number of flights` = n()) %>% full_join(airports, by = c("dest" = "faa")) %>% select(dest, name, `Number of flights`)

mysteryPlanes = flights |> select(flight,carrier,dest,origin) |>
  
  # grouping by destination to get the number of mystery planes by summarizing and joining to the airports data on the dest and faa variables
  
group_by(dest) |>
  summarise(Number=n()) |> 
  full_join(airports, by = c("dest"="faa")) |> select(dest,name,Number)

Mystery_dest %>% 
  arrange(desc(`Number of flights`)) %>% 
  head(10) |> 
  ggplot() +
  geom_col(
    aes(x = dest, y = `Number of flights`), 
    fill = "cornflowerblue"
    ) +
  theme_linedraw()

# Uncomment the code below to save the mysteryPlanes data as a csv to your repository
# write.csv(mysteryPlanes, "Path to export the DataFrame\\File Name.csv", row.names=FALSE)
  1. All other members of the team will pull the changes onto their local system.

  2. Each of you will then create your own branch.

  3. Divide the code among yourselves so that each of you works on a different part of the code.

  4. Discuss some stylistic standards that your team will follow. Eventually, these will be listed in your style guide.

  5. Each of you will format your part of the code according to the standards you’ve agreed upon.

  6. Commit and push your changes.

  7. Create a pull request to merge your changes back into main. Don’t merge the changes yet.