Skip to content

Instantly share code, notes, and snippets.

@ironhack-edu
Created February 18, 2020 06:22
Show Gist options
  • Save ironhack-edu/dd3635de73a6ef07ef337bf184eda985 to your computer and use it in GitHub Desktop.
Save ironhack-edu/dd3635de73a6ef07ef337bf184eda985 to your computer and use it in GitHub Desktop.

logo_ironhack_blue 7

General guidelines for labs/assignments

In this document, you will find all the steps you should follow when working on the labs (in the prework and during the bootcamp).

Step 1: Fork the repository

The majority of time, you will have to start the process with forking. Just a quick reminder on what is the process of forking.

:::info Creating a “fork” is producing a personal copy of someone else’s project. Forks act as a sort of bridge between the original repository and your personal copy. ::: If you forked someone's project, you will be able to push your code (this is called making pull request, and we will be talking about it soon) so the owner of the original project can check it and if they find it useful, use it.

During your Ironhack journey, you have to fork each lab to be able to submit it. This way, your TAs, and instructors will be able to check your work and give you feedback.

How to fork?

All the examples will be related to your Ironhack journey, and they will point to the ironhack-labs GitHub organization.

Navigate to the repository you want to fork. Let's take an example of the prework HTML exercise.

After clicking on the fork button, you will be presented with the loading screen that will most likely look like this:

After the forking is done successfully, you will be redirected to the copied repository on your GitHub account.

We are done here with the forking process.

Step 2: Clone the repository

Now, on your GitHub account, you have access to the copied repository. This will be repository you will copy (clone) to your local machine, and that will be your working area.

How to clone repository?

  1. Click on the green ‘Clone or download’ button and copy the link by selecting and copying or by using the clipboard button.

  1. Open your terminal and navigate to the location where you want to store the local version of your repository.
  2. When you navigated to the correct folder in your terminal run the following command:
$ git clone <paste url from the clipboard>

Check the image below if you have any doubts:

  1. Once the cloning process is done, you see the following information in your terminal. And you can check that repository was successfully cloned from GitHub to your local machine by running ls command in your terminal:

The cloning process is finished with this step. Now you can use the code to make changes before we proceed to the next step, which is pushing the changes to the forked repository on your GitHub.

Using cloned repository locally

Before you open the project, you have to navigate into the cloned folder because that’s where git is initialized:

$ cd <name of cloned folder >

To open the project in VS Code, you have to run the following command when you already navigated to the folder:

$ code .

If in doubt, check the following image:

Now we are ready to start working/making changes. Quickly go to the terminal and, while in the copied repository, run the following command:

$ git status

This shows us that there were no changes made locally, yet.

Step 3: Add, commit and push the changes

After you made changes to your project, you can check which files you changed by running again:

$ git status

How to add changes?

Currently, we demoed making changes to a single file. You might be making changes to one or multiple files; thus, you might see many files marked as modified.

In case you want to add just one file and you are not ready to add the others, you can do so with the following command:

$ git add <name of the file>

However, most likely, you would like to add all the changes so that you will use the following command more often:

$ git add .

👍 The dot represents all files in the current repository.

How to commit changes?

After all changed files are added, you should commit your files and add a commit message describing the things you have changed, with the following command:

$ git commit -m “<your message>

How to push changes?

After committing your changes, you can push the commits from your local machine to your remote repository on GitHub with the following command:

$ git push origin master

Perfect! The changes we made are now available in the remote repository on our GitHub profile.

Now, let's go to the GitHub and learn how to make the pull request.

Step 4: Create a pull request

After pushing your changes from your local master to the remote master, your commit should be visible on GitHub (the changes you made locally are now available in GitHub repository as well).

When your commit is successfully pushed to GitHub, you can create a pull request by clicking on the "New pull request" button.

After clicking on that button, you will be forwarded to the following page:

As you can see in the image above, when you initialize the process for creating the pull request, you will be redirected to the original repository (where you were at the very beginning when you started the process of forking).

The final step is just to fill out the pull request title and the body.

By pressing the green “Create pull request” button, you will create the pull request to the original lab repository.

The final

If you would click on the "Pull requests", you will see your own pull request:



That would be it. Happy coding! ❤️

@luciagomezgast
Copy link

Done!

@Magalvo
Copy link

Magalvo commented Jan 12, 2023

Done! :)

@Bujio
Copy link

Bujio commented Jan 13, 2023

Done!

@FMRezende
Copy link

Done!

@Vankosav
Copy link

done!

@agoss-snm
Copy link

done :)

@SenemDEV
Copy link

SenemDEV commented Feb 9, 2023

Done!

@Deezledee
Copy link

Done! Looking forward to starting the course! :D

@APerkins03
Copy link

DONE!

@Raiden-W
Copy link

Done~

@gongtzuuuu
Copy link

Done :)

@Fabian04HV
Copy link

Done

@IndraTNPTL
Copy link

Done :) !!

@reshmanidhish
Copy link

Done

@didemydn
Copy link

Done!

@MijyPark
Copy link

Done.

@AlvaroSapata
Copy link

Done.

@Marisa-Pinheiro
Copy link

Done.

@jcarrilho
Copy link

Done.

@mapmargaridapereira
Copy link

Done 😃

@tonitoar
Copy link

tonitoar commented Apr 2, 2023

Done !

@Shashithushani
Copy link

Done!

@devinfiachra
Copy link

If anyone needs the text to copy/paste for the HTML/CSS assignment you can see a similar version of the npm page here: http://web.archive.org/web/20191206063722/https://www.npmjs.com/

@zsaritek
Copy link

zsaritek commented Aug 3, 2023

Done! 🥳 🎈

@sergioironhacker
Copy link

hecho ;)

@Pabloluis9
Copy link

Buenos días chicos! una pregunta, que enlace hay que copiar para pegarlo y enviarlo para la evaluación? Gracias!

@sergioironhacker
Copy link

sergioironhacker commented Aug 21, 2023 via email

@Pabloluis9
Copy link

Pabloluis9 commented Aug 21, 2023 via email

@AlfG71
Copy link

AlfG71 commented Aug 26, 2023

Hecho!

@Addiyo22
Copy link

Done!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment