This repository will provide the instructions to set up your repository, create branches, and push your work.
Instead of cloning the entire repository, it's easier to work with individual branches in separate directories. Start by creating a new directory for your module or project and navigate to it:
mkdir <web[x]-module-name>
cd <web[x]-module-name>
Replace
<web[x]-module-name>
with the specific web section and module.
Example:
mkdir web2.5-faucet
cd web2.5-faucet
Initialize a new Git repository in the directory and add the remote repository:
git init
git remote add origin https://github.com/codecrypto-academy/<your-github-username>.git
Replace
<your-github-username>
with your Github account.
For each module or project, you will need to create a new branch. The module name project will be provided at the end. The branch name should follow this format:
web[x]-[provided-module-name]
Examples:
web2-nextjs
web2.5-faucet
web3-ethereum-erc-20
Create the new branch and start working on it:
git checkout -b <branch-name>
Example:
git checkout -b web2.5-faucet
Once on your branch, you can make changes, add files, and commit your work. For example:
# Add new files or make changes to existing ones
git add .
git commit -m "Added project files for <branch-name>"
Replace
<branch-name>
with the appropriate name.
When you're ready to push your changes, use the following command:
git push origin <branch-name>
Example:
git push origin web2.5-faucet
If you need to switch between branches, use:
git checkout <branch-name>
If you need to delete a branch locally or on GitHub after it's no longer needed, use:
-
Locally:
git branch -d <branch-name>
-
On GitHub:
git push origin --delete <branch-name>
- Main Branch: The
main
branch serves as your public portfolio and is protected. You should not push any changes directly to themain
branch. - Branch Naming: Always name your branches according to the module or project you're working on.
- Commits: Make sure your commit messages are clear and descriptive.