Repo para la charla de git de la hacktober week. Incluye un modulo "calculator" sin terminar para que los participantes tengan la oportunidad de trabajar sobre un repositorio e implementar lo impartido en el taller.
Si no la tienes, asegurate de configurar una clave ssh, para ello:
-
Verifica si la tienes con el comando
ls -al ~/.sshSi apareceid_rsa o id_ed25519, ya tienes una. -
Si no tienes, genera una:
ssh-keygen -t ed25519 -C "[email protected]"(dale Enter a todo).
Activa el agente ssh y añade tu clave:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519Copia tu clave pública:
cat ~/.ssh/id_ed25519.puby pégala en GitHub: Settings > SSH and GPG Keys > New SSH key.
Prueba conexión:
ssh -T [email protected]Te debe salir un mensaje tipo: "Hi usuario! You've successfully authenticated..."
Clone the repo:
git clone [email protected]:aulasoftwarelibre/taller-git.git taller-gitNow you are able to add changes to this repository!
Create a new branch in order to start working:
git branch your-new-branch(your-new-branch its an example of a name, you may choose any name you want)
Move to your new branch:
git checkout your-new-branchYou can also create a branch and move to it directly with the following shortcut:
git checkout -b your-new-branchStage your changes:
git add changed-file-routeCommit your changes to your current branch:
git commit -m "changes-title"Push your branch to the remote repository:
git push -u origin your-new-branchThen you can create a pull request in the repository's GitHub!
If git ask you for an user/password, avoid it with ctrl+C and use the following command:
git remote set-url origin [email protected]:aulasoftwarelibre/taller-git.gitClona el repositorio localmente:
git clone [email protected]:aulasoftwarelibre/taller-git.git taller-gitYa puedes empezar a trabajar remotamente en el proyecto!
Crea una nueva rama para trabajar correctamente:
git branch your-new-branch(your-new-branch es un nombre de ejemplo para tu nueva rama)
Muevete a tu nueva rama:
git checkout your-new-branchTambién puedes crear una rama y moverte a ella directamente con el siguiente atajo:
git checkout -b your-new-branchEscoge los cambios que quieras subir:
git add changed-file-routeConfirma los cambios en tu rama:
git commit -m "changes-title"Haz un push de tu rama al repositorio original de github:
git push -u origin your-new-branchYa solo tienes que crear una nueva pull request desde el GitHub del repo para añadir tus cambios. Recuerda hacer push de los cambios que hagas localmente al repositorio remoto con el comando anterior!
Si git te pide un usuario/contraseña, evita el input con ctrl+C e introduce el siguiente comando:
git remote set-url origin [email protected]:aulasoftwarelibre/taller-git.git