Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

2. GitHub Tutorial for Beginners

danilomartinss edited this page Jan 24, 2024 · 1 revision

1. Create a GitHub Account:

  • Go to GitHub.
  • Click on "Sign up" and fill in the required information (username, email, password).
  • Follow the instructions to verify your email.

Git01

2. Access Repository and Request Permission:

  • If someone else owns the repository, ask them to add you as a collaborator(in our case, please contact Joshua Baskaran).

3. For regular users:

3.1. After gaining access to the repository, you will be able to navigate through the project folders.

image

3.2. Switching to "dev_1.1" Branch:

  • To switch from the current branch to the dev_1.1 branch we use at the moment, click on "main" and after select the "dev_1.1"

image

3.3. With the branch "dev_1.1" (or your selected branch) now active, you can freely edit any file. Click the edit button, make the necessary changes, and then click 'commit changes.'

Git04


Git05

3.4. Write a title for your modification, such as 'Update tromsoe.astro' add any additional comments if desired, and click 'commit changes' again.

Git06

3.5. If you wish to create a new file, navigate to a project folder. Click on 'Add new file' or 'Upload files.'

Git07

3.6. Specify the file name (1) and add the content(2). And just like in the editing process, when you finish the content, click 'Commit changes'(3) and choose a title for your modification."

Git08


Git09

4. For users familiar with terminal commands:

4.1. Install Git:

4.2. Configure Git:

  • Open a terminal or command prompt.
  • Set your username and email:
    git config --global user.name "Your Username"
    git config --global user.email "your.email@example.com"

4.3. Clone the Repository:

  • Go to the repository on GitHub.
  • Click on the "Code" button and copy the repository URL.
  • Open a terminal/command prompt and run:
    git clone https://github.com/ELIXIR-NO/elixir-no-webpages.git
    cd elixir-no-webpages

4.4. Create a New Branch:

  • It's good practice to work in a separate branch for each feature or bug fix.
  • Create a new branch:
    git checkout -b new-branch

4.5. Make Changes:

  • Open the project in your favorite code editor.
  • Make the desired changes. For more detailed instructions, refer to Making Changes/Add Content.

4.6. Commit Changes:

  • After making changes, stage them and commit:
    git add .
    git commit -m "Description of the changes"

4.7. Push Changes to GitHub:

  • Push your changes to the repository:
    git push origin new-branch

4.8. Create a Pull Request:

  • Go to the repository on GitHub.
  • Switch to the branch you just pushed.
  • Click on "New pull request."
  • Write a title and description for your changes.
  • Submit the pull request.

4.9. Merge Changes:

  • If you own the repository, you can merge the changes.
  • Review the changes and click "Merge pull request."