-
Notifications
You must be signed in to change notification settings - Fork 24
GitHub Codespaces for Authors
The branch name will be displayed in the left side of the bottom toolbar, just to the right of the blue Codespaces box. If you haven't done anything, it should say 'main'. If necessary, change back to the main branch (click on the branch name, then select "main" from the list), then press the sync icon (the two arrows forming a circle right next to the branch name in the bottom toolbar) to pull in the latest changes from the Github repo.
Click on the branch name (if you did step 0, it will be "main") and select "Create new branch".
Then type in a name of your new branch. Ideally this describes the changes you will make, but is ultimately not super important.
Be sure to preview the output.
On the left, select the source control tab (fourth icon from top)--it should have a little blue circle with a number in it (the number of files you changed).
To the right of where it says 'Changes', if you hover a + will appear--click this to stage all of your changes.
Type a commit message into the box, and then select 'Commit and Sync' from the blue Commit dropdown. You will likely get a message 'The branch branch-name has no remote branch. Would you like to publish this branch?' Hit "OK". This warning just means you created a branch locally, but haven't told the Github website yet about it.
Note: if you receive the error message Can't push refs to remote. Try running "Pull" first to integrate your changes.
, you forgot to create a new branch. See How to fix Branch Issues.
You should get a popup in the bottom right prompting you to 'Create a Pull Request'. Do this.
You should type in a description of your changes. To the right of where it says 'Create', click the second icon (from the left) to add a reviewer. If you know this is done and ready for review, hit 'Create', otherwise you can 'Create draft', and continue working and send it for review later.
You'll now get a preview of the pull request from the Github website; you can just close this. The reviewer you selected will be notified, and will either approve and merge in your changes, or start a discussion about them.