A handful of git-related things I’ve learned since starting the March Madness Challenge

On Sunday, March 1, I started to make a JavaScript version of an app I’ve made with Flask that plans out a bar hop based on user input. The problem is that this requires a Yelp API key, and there’s no way to keep that secret from the internet at large with JavaScript. A .gitignore file doesn’t help since JS files need to be linked to the HTML.

I accidentally committed the API key to my GitHub before I realized this, and that led me to learn about GitHub’s procedures for scrubbing mistakes like that. They have a whole help section on it, which makes me feel (very) slightly less silly for doing so. On smaller projects like mine that are unlikely to have multiple clones all over the place, it’s fortunately pretty easy to undo that mistake. I put that project on pause for now and plan to make a Flask backend for it over the weekend so the key is safe. Either way, creating that repository was my commit for March 1!

On Monday, March 2, I noticed that I had only one “activity” logged in GitHub for March 1 and none for March 2, even though I had been doing quite a few commits to the BarHop repository and to my pair project. Surely I didn’t have to create a new repository every single day to get on the activity board!

Some googling turned up this handy list of what exactly counts as activity:

  • Issues and pull requests (I didn’t make either of these this month)
  • Commits that:
    • use the email associated with my GitHub account
    • are made in a standalone repository (i.e. no forks)
    • are made in the main/default branch of a repository
    • are made in a repository which you:
      • are a collaborator on / member of
      • have starred
      • have forked
      • or have opened an issue or pull request for

They also have an FAQ / common issues list, and after some investigation I turned up the reason my pushes weren’t registering as activity: I had changed my GitHub email a while back but had not subsequently changed the email for my local git settings.

With that fixed, my GitHub activity has shot up. Obviously the quality of code and the productivity of a particular day are not measured in commits/pushes, but it’s nice to have the visual. We are still on track for the March Madness challenge!

March 1 – 5

Visits: 378