Git and GitHub FAQs

Questions about Git and GitHub at the Urban Institute and Additional Resources

1 FAQs

Git and GitHub seem a little scary. How do I get started?

Start by using these tools for solo work. It is the lowest stakes way to develop skills that will be valuable for collaboration.

Where can I go for help if I get stuck?

Running into errors is an inevitable part of working with Git and GitHub, but we’re here to help! Drop a message in the #github Slack channel if you run into issues.

When should I use UrbanInstitute vs. UI-Research?

UI-Research is considered and should be treated as the default organization for all Urban GitHub repositories. UI-Research uses the “Team” plan, while UrbanInstitute is on the Free tier. See the GitHub documentation for more details on features.

The most common use-case for UrbanInstitute is for sharing source code of data tools on Urban’s website. For example in this tool, you can find a link to the GitHub repository for the project at the bottom of the page.

If you are sharing code publicly and have questions about review prior to release, use the Code Review form.

Can I use Git and GitHub with projects that have confidential data stored on the Y Drive?

Yes! Read this guide for tips on how to do so.

Should I use Git inside of Box? (i.e. turn a Box folder into a Git repository)

No – we strongly recommend keeping Box folders and GitHub repositories separate.

What kinds of files should I track with Git?

Generally, you should only track code (i.e., scripts written in R, Stata, SAS, Python, etc.) with Git. You should not track large data files or binary files (i.e., Word, Excel files). There are occasions when tracking small data files with Git might make sense, but you should never store confidential data on GitHub (even in a private repository). We recommend getting familiar with .gitignore files, which can prevent you and your collaborators from accidentally pushing files to GitHub. GitHub provides hundreds of template .gitignore files for specific programming languages (e.g. R, Stata, or Python) or operating systems (e.g. Windows or MacOS) that can be useful as a starting point.

How do I add documentation to my repositories?

Use README files to add context and documentation to your repos. These are Markdown files in the root of your directory named README.md that can help folks understand the structure and contents of your repo. Markdown Live Preview can be a useful tool to help with formatting.

What permissions should I give my collaborators?

In general, you should follow the principle of least privilege, which means that you should give folks the minimum level of access they need, but no more than that. In most cases, this will be the Write role, but you should refer to GitHub’s guide describing the different roles and what they allow. If you need elevated permissions for a repository, post a message in the #github Slack channel.

Are there other commands that can be helpful when using Git from the command line?

Definitely! Learning a few simple Bash commands can be helpful for navigating the command line. A few common commands include pwd (to print your current directory), cd (to change directories), and ls (to list the files in a directory). For an introduction to these commands and others, we recommend this guide from Friendly Django or this guide from Happy Git with R.

2 Additional Resources