1.2. Editing a file in an existing project

1.2.1. Find the file

  1. Go to your project GitHub page. For example, this project page is https://github.com/nsidc/git-training

  2. Navigate to the file you want to edit. Click on folders and files until you’re viewing a preview of the file you want to edit

1.2.2. Edit the file

For simple edits, use edit with GitHub.com

  1. Click on the pen icon, or select Edit this file from the v dropdown next to the pen icon

Edit a file

  1. Edit the file

  2. When done editing, it is important to leave a commit message documenting what changes you made

    1. Leave a short one-line commit message

    2. If more details are needed or may be useful, leave an extended discription

    3. If the change is small, or you are working alone on your own project, you can commit directly to the branch you are on. This is probably the main branch

    4. If the change is large, there are other people working on the project, or you want to discuss the change with someone before finalizing it, select Create a new branch for this commit and start a pull request

  3. Select the Commit changes button

If you commit to a new branch and create a pull request, you will eventually want to merge the pull request back to your main branch.

Commit changes