GithubHelp home page GithubHelp logo

git_pony-club-tp's Introduction

GitHub Logotype

Pony Club

Exercice pour Débuter avec Git et Github

I. Pour commencer

  1. Télécharger et installer Git (https://gitforwindows.org/)
  2. Récupérer ce projet en téléchargeant le zip. en mettant son contenu dans un dossier PONY_CLUB, dans vos documents
  3. Les ressources images seront disponibles dans le dossier ressources
  4. Lancer le terminal git bash
  5. Utilisez l'aide mémoire des commandes git (https://github.com/sauvageb/pony-club-tp/blob/master/github-git-cheat-sheet.pdf)
  6. En cas de blocage, vous pouvez consultez les ressources en bas de l'exercice

II. Les bases

  1. Commencer par configurer votre outil Git : (-> informations sur la configuration)

  2. Se placer dans ce dossier avec Git Bash (-> informations sur git init)

  3. Montrer le statut de l’arbre de travail (-> informations sur git status)

  4. Placer vos nouveaux fichiers sous suivi de version (-> informations sur git add)

  5. Afficher de nouveau le statut de l'arbre de travail. Quelle commande utilisez-vous ?

  6. Valider vos modifications (-> informations sur git commit)

  7. Afficher de nouveau le statut de l'arbre de travail.

  8. Dans l'HTML, à la suite de Apple Jack, ajouter le Little Pony Rainbow Dash

  9. Afficher de nouveau le statut de l'arbre de travail.

  10. Inspecter les modifications indexées et non indexées (-> informations sur git diff)

  11. Indexer vos fichiers modifiés et Valider vos modifications

  12. Visualiser l'historique des validations (-> informations sur git log)

III. Les branches (-> informations <-)

  1. Visualiser les branches de votre dépôt local actuel

  2. Créer une branche

  3. Visualiser de nouveau les branches de votre dépôt local actuel

  4. Basculer sur la nouvelle branche

  5. Rajouter le little pony Fluttershy, Utilisez l'image de votre choix, à mettre dans le dossier img

  6. Afficher de nouveau le statut de l'arbre de travail

  7. Inspecter les modifications indexées et non indexées

  8. Indexer vos fichiers modifiés et Valider vos modifications

  9. Ouvrez votre fichier html avec un navigateur et regardez la page

  10. Afficher de nouveau le statut de l'arbre de travail

  11. Encore une fois, rajouter un dernier little pony :

  12. Indexer vos fichiers modifiés et Valider vos modifications

  13. Basculer sur votre branche principale (main ou master)

  14. Ouvrez votre fichier html avec un navigateur et regardez la page

  15. Inspecter les modifications entre master et votre branche

IV. Fusion d'une branche sur la branche master

  1. Basculer sur votre branche principale (main ou master)

  2. Modifier le même fichier que celui édité dans l'autre branche, mais à un endroit différent !!. (Ajouter un header au dessus du H1)

  3. Inspecter les modifications indexées et non indexées

  4. Indexer vos fichiers modifiés et Valider vos modifications

  5. Ouvrez votre fichier html avec un navigateur et regardez la page

  6. Basculer sur votre branche feature

  7. Ouvrez votre fichier html avec un navigateur et regardez la page

  8. Le merge doit se faire depuis master -> Basculer sur votre branche master

  9. Effectuez une fusion des branches (-> informations <-)

Pour enregistrer un message de merge avec vim, utilisez :wq

  1. Ouvrez votre fichier html avec un navigateur et regardez la page

  2. Effacer la branche feature

V. Gérer un conflit lors de la fusion d'une branche sur la branche master

  1. Créer une nouvelle branche et basculer sur celle-ci

  2. Faire une modification dans le titre H1

  3. Indexer vos fichiers modifiés et Valider vos modifications

  4. Ouvrez votre fichier html avec un navigateur et regardez la page

  5. Basculer sur votre branche principale (main ou master)

  6. Effectuez une modification au même endroit que l'autre branche (dans le titre H1)

  7. Indexer vos fichiers modifiés et Valider vos modifications

  8. Effectuez une fusion des branches

  9. Un conflit est apparu : À l'aide de VS Code, choississez manuellement le contenu du fichier à conserver

  10. Une fois résolu, Indexez vos fichiers modifiés et Validez vos modifications

  11. Ouvrez votre fichier html avec un navigateur et regardez la page

  12. Indexer vos fichiers modifiés et Valider vos modifications, regardez la page

  13. Effacer la branche

VI. Pousser votre code source de projet vers un dépôt distant (Github)

  1. Avec un navigateur, créer un dépôt distant sur Github (https://github.com/new)

  2. Afficher les dépôts distants configurés sur votre dépôt local (-> informations sur git remote)

  3. Si un dépôt distant existe, Retirez-le (Si vous avez bien suivi le TP, il n'y en a pas.)

  4. Configurer votre dépôt local avec l'url de ce nouveau dépôt distant

  5. Vérifier qu'un dépôt distant existe désormais

  6. Poussez votre travail sur votre dépôt distant

  7. Vérifier que votre travvail est visible sur votre dépôt distant (https://github.com)

VII. Récupérer le code d'un remote repository existant

  1. Trouvez un projet sur Github grâce la recherche (https://github.com/search). Vous pouvez utilisez celui-ci ou celui de votre voisin ?

  2. Placez votre git bash dans vos documents, contenant vos projets (au moins PONY_CLUB)

  3. Cloner un dépôt existant (initialisation d'un dépôt local à partir d'un projet existant)

VIII. Le meilleur pour la fin...Activez les Github Pages

  1. Renseignez-vous sur les Github Pages (https://pages.github.com/)

  2. Retourner sur votre projet Pony Club et activer les Github Pages

  3. Mettre en ligne votre dépôt distant avec une url comme celle-ci : http://username.github.io/remote_repository/

Félicitations, vous avez acquis les bases de Git et Github !

Si vous êtes bloqués, voici quelques ressources

Leçons Git (Github) https://github.com/git-guides/

Débuter avec Git et Github (Le Wagon) https://www.youtube.com/watch?v=V6Zo68uQPqE

Gérer vos codes sources avec Git (OpenClassRooms) https://openclassrooms.com/courses/gerez-vos-codes-source-avec-git

Git – petit guide http://rogerdudler.github.io/git-guide/index.fr.html

Git Beginner’s Guide for Dummies https://backlogtool.com/git-guide/en/

Learn Git (CodeCademy) https://www.codecademy.com/learn/learn-git

Try Git (CodeSchool) https://www.codeschool.com/courses/try-git

La doc Github :

Tutoriel de démarrage https://guides.github.com/activities/hello-world/

git_pony-club-tp's People

Contributors

sauvageb avatar trefaltc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.