instructions on how to do things on GitHub
To contribute your code to a group project, you need to clone a repo first to your local machine. It's also possible to work in GitHub Codespaces (online). After cloning, you either select a specific development branch, or create a new one. Rules for naming branches will be here. (at some point)
tl;dr
- Clone
- Branch
- Code
- Pull request
- Code review
- Merge
e.g. this one. You can use this demo repository to test things out.
- a. copy the command, paste into command line, execute
- b. open with GitHub Desktop
- c. Download ZIP file.
Choose the option that works best for you.
Branching can be done in a number of ways. Here is an example how to do it from the level of a GitHub repo. Option 1.
e.g. this one. You can use this demo repository to test things out.
It opens up a dialog that allows you to switch to other existing branches, but also allows to create a new one. This option offers less control in regards to the branching point.
Branching can be done in a number of ways. Here is an example how to do it from the level of a GitHub repo. Option 2.
e.g. this one. You can use this demo repository to test things out.
Click on the green button: "Create a new branch".
Fill in the branch name, select branch source and click the green button. Done!
Branching can also be done properly, from the command line / terminal.
You can check where you are in a local file repository using the pwd
command. It should print working directory (aka filepath).
It should list all the branches that are in a certain repository. A * will appear next to the currently active branch.
(skip the square brackets, don't use spaces). It will create a new branch at the current commit.
This command will switch your code changes to the branch you specified.