Skip to content

Getting Started with Git

Dan Harris edited this page Mar 20, 2020 · 2 revisions

Step 1: Create a free GitHub account

Go to https://github.com/join and follow the steps to create a free GitHub account.

Step 2: Download the GitHub Desktop client

If you are brand new to git, then the easiest way to get started is to use the GitHub Desktop application.

You can download the desktop application from here.

Once you have downloaded and installed the application, you will sign in with the account that you created in Step 1.

For more on GitHub Desktop, see here

Step 3: Fork the Housing Hub Repository

The main Housing Hub repository is found at https://github.com/code-for-charlottesville/housinghub.

Once on that page, there is a "Fork" button on the top right corner of the screen. When you click it, follow the instructions to create your personal fork of the Housing Hub repository

You will not push code directly to this repository though. The process for getting code included (or "merged") into the main repository is to

  1. Make changes on your personal fork of the main repository
  2. Submit a "pull request" to have your changes merged into the main repository
  3. Once the maintainer(s) of the main repository determine that your changes are acceptable, the change will be merged to the main repository.

Step 4: Creating a Pull Request

You can modify the source code in the repository using your editor or IDE of choice. When you modify the source code, git will detect that change have been made.

From the desktop client, you should now see both a visual diff of the changes you've made and button on the bottom left which says "Commit to master." Make sure to add a description of your change in the text box above the button. This will tell other developers on the project about the changes in this commit.

Now you have a new commit on your local machine but it still needs to be pushed to the "origin" repository. On the main GitHub desktop screen, you should see a blue button that says "Push origin," click this button to push your local changes back to GitHub. Note that this will only push your changes to your personal fork, not the main repository.

Now it's time to create a Pull Request. From the GitHub desktop menu choose Branch > Create Pull Request. This should open your browser to GitHub (you may need to sign at this point if you are not already signed into GitHub in your web browser). The default settings should be correct, but what you want is:

base repository: code-for-charlottesville/housinghub base: master head repository: /housinghub compare: master

Now just click the green "Create pull request" button, add a helpful description of your change and click "Create pull request" again to finish up.

Step 5: Wait for comments

At this point, your change will be reviewed by the maintainer(s). They may have suggestions on how to change your pull request in order to better match existing guidelines. Once the maintainers determine that the change meets existing standards, they will merge your change to the main repository.

Clone this wiki locally