0% found this document useful (0 votes)
37 views5 pages

Testttttt 1

1. The document describes an assignment where students will create a simple Java program and share it on GitHub. They will then make changes to a teammate's project and have a teammate make changes to theirs. 2. To complete the assignment, students will create a project in IntelliJ, write code to display their name, and share the project on GitHub. They will then modify a teammate's project and have a teammate modify theirs. 3. The final steps involve reviewing commits through the version control tool in IntelliJ and completing a stretch challenge to practice undoing changes using Git tools.

Uploaded by

Fredy Hernandez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views5 pages

Testttttt 1

1. The document describes an assignment where students will create a simple Java program and share it on GitHub. They will then make changes to a teammate's project and have a teammate make changes to theirs. 2. To complete the assignment, students will create a project in IntelliJ, write code to display their name, and share the project on GitHub. They will then modify a teammate's project and have a teammate modify theirs. 3. The final steps involve reviewing commits through the version control tool in IntelliJ and completing a stretch challenge to practice undoing changes using Git tools.

Uploaded by

Fredy Hernandez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment

It this assignment, you will create a simple Java program


and put it into GitHub. You will then ask one of your team
members to make a change to your project. You will also
make a change to another team member's project.
1. Create a project in IntelliJ called HelloFrom<Name> (if you
first name was Bob, then this would be HelloFromBob).
2. Write code in your IntelliJ project to say "Hello, my name is
<your name>". Run your program to make sure it works.
3. Share your project into Github by going to menu option VCS,
selecting "Import into Version Control", and selecting "Share
Project on Github". You may be prompted to login to Github.
You will prompted to create a GitHub repository. Make sure
that the repository is public (don't select the private checkbox).
You will also be prompted to add the code (including other
IntelliJ files associated with your project). After selecting Add,
IntelliJ will automatically push your code into GitHub.
4. Goto GitHub and verify that you see your new repository.
5. While in Github, click on Settings and goto to Manage Access.
Add all members of your team as collaborators for your project.
6. At least one member of your team must make a modification in
your project. You must make at least one modification in
another team members project. To make a modification in
another project, goto IntelliJ and open the project from your
team members GitHub repository by doing either one of the
following:
o Select menu option File, then New, then Project
from Version Control; or
o From the opening screen with no project open,
select Get from Version Control
You will need to type in the URL for your teammate's
repository in GitHub. You will also specify where you want the
project to be placed on your hard drive.
7. Add a line of code in the program to display "Hello <your team
members name>, my name is <your name>." Run the program
to make sure it works.
8. Using either the Git tools in IntelliJ or using the Git Bash
command line, commit and push your changes. If a merge
conflict happens, you will need to manually fix the merge
conflict.
9. In IntelliJ, open the Version Control window (goto View, Tool
Windows, and select Git). Click on the Log tab in the Git
Window. Observe the commits that you and others have made.
Find the diff button to view the changes made to files in each
commit.
10.After you have successfully updated someone else's project,
take a screen shot of your repository in GitHub (instead of
submitting code) and then take the quiz in I-Learn.

If you've made it this far successfully, you're eligible for a


93%. To be eligible for 100% credit, complete the Stretch
Challenge below.

🌟STRETCH CHALLENGE (7%)🌟

IntelliJ offers many options to undo changes by


using git. Practice the following in one of your
repositories (you will likely need to commit some
changes to do these tests):
o See Changes Since Last Commit: Right click on a
Java file (look in the git sub-menu and select
compare with the same repository version) to view
the changes made to it since the last commit or pull.
o Undo Changes Since Last Commit: Right click on
a Java file (look in the git sub-menu and select
rollback to revert back the uncommitted changes.
This does not use "git revert" but a form of "git
checkout" which clears the local changes.
There are options to undo commits (includings ones
you already pushed into GitHub). However, you are
encouraged in this course to correct a bad commit
with a new corrected commit. Look at the code to
see what you need to change to fix a problem. Rely
on the diff's provided between commits to see what
you changed if you are uncertain.

Asignación
En esta asignación, creará un programa Java simple y
lo pondrá en GitHub. Luego le pedirá a uno de los
miembros de su equipo que haga un cambio en su
proyecto. También realizará un cambio en el proyecto
de otro miembro del equipo.
1. Cree un proyecto en IntelliJ llamado HelloFrom <Name> (si su
primer nombre es Bob, este sería HelloFromBob).
2. Escriba código en su proyecto IntelliJ para decir "Hola, mi
nombre es <su nombre>". Ejecute su programa para asegurarse
de que funcione.
3. Comparta su proyecto en Github yendo a la opción de menú
VCS, seleccionando "Importar a control de versiones" y
seleccionando "Compartir proyecto en Github". Es posible que
se le solicite que inicie sesión en Github. Se le pedirá que cree
un repositorio de GitHub. Asegúrese de que el repositorio sea
público (no seleccione la casilla de verificación
privada). También se le pedirá que agregue el código (incluidos
otros archivos IntelliJ asociados con su proyecto). Después de
seleccionar Agregar, IntelliJ enviará automáticamente su
código a GitHub.
4. Vaya a GitHub y verifique que ve su nuevo repositorio.
5. Mientras esté en Github, haga clic en Configuración y vaya a
Administrar acceso. Agregue a todos los miembros de su
equipo como colaboradores para su proyecto.
6. Al menos un miembro de su equipo debe realizar una
modificación en su proyecto. Debe realizar al menos una
modificación en el proyecto de otro miembro del equipo. Para
realizar una modificación en otro proyecto, vaya a IntelliJ y
abra el proyecto desde el repositorio de GitHub de los
miembros de su equipo realizando una de las siguientes
acciones:
o Seleccione la opción de menú Archivo, luego
Nuevo, luego Proyecto desde Control de
versiones; o
o Desde la pantalla de inicio sin ningún proyecto
abierto, seleccione Obtener del control de versiones
Deberá escribir la URL del repositorio de su compañero de
equipo en GitHub. También especificará dónde desea que se
coloque el proyecto en su disco duro.
7. Agregue una línea de código en el programa para mostrar
"Hola, <el nombre de los miembros de su equipo>, mi nombre
es <su nombre>". Ejecute el programa para asegurarse de que
funcione.
8. Usando las herramientas de Git en IntelliJ o usando la línea de
comando de Git Bash, confirme y envíe sus cambios. Si ocurre
un conflicto de fusión, deberá solucionarlo manualmente.
9. En IntelliJ, abra la ventana Control de versiones (vaya a Ver,
Ventanas de herramientas y seleccione Git). Haga clic en la
pestaña Registro en la ventana de Git. Observe los
compromisos que usted y otros han hecho. Busque el botón diff
para ver los cambios realizados en los archivos en cada
confirmación.
10.Una vez que haya actualizado con éxito el proyecto de otra
persona, tome una captura de pantalla de su repositorio en
GitHub (en lugar de enviar el código) y luego responda el
cuestionario en I-Learn.

Si ha llegado tan lejos con éxito, es elegible para un


93%. Para ser elegible para un crédito del 100%,
complete el Desafío de estiramiento a continuación.
🌟DESAFÍO DE ESTIRAMIENTO (7%) 🌟

IntelliJ ofrece muchas opciones para deshacer


cambios usando git. Practique lo siguiente en uno de
sus repositorios (es probable que deba realizar
algunos cambios para realizar estas pruebas):
o Ver cambios desde la última confirmación : haga
clic con el botón derecho en un archivo Java
(busque en el submenú git y seleccione comparar
con la misma versión del repositorio) para ver los
cambios realizados desde la última confirmación o
extracción.
o Deshacer los cambios desde la última
confirmación : haga clic con el botón derecho en un
archivo Java (busque en el submenú git y seleccione
deshacer para revertir los cambios no confirmados.
Esto no usa "git revert" sino una forma de "git
checkout" que borra el cambios.
Hay opciones para deshacer confirmaciones
(incluidas las que ya introdujo en GitHub). Sin
embargo, en este curso se le anima a corregir una
mala confirmación con una nueva confirmación
corregida. Mire el código para ver qué necesita
cambiar para solucionar un problema. Confíe en las
diferencias proporcionadas entre confirmaciones
para ver qué cambió si no está seguro.

You might also like