GithubHelp home page GithubHelp logo

maximeculea / meetup-git Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 22.71 MB

Meetup sur GIT

Home Page: https://maximeculea.fr

License: Other

PHP 66.88% CSS 10.45% JavaScript 22.55% XSLT 0.12%
git wordpress meetup learning-git learning

meetup-git's Introduction

Introduction au gestionnaire de version GIT

WP Meetup Geneva

WP Meetup Paris

General git workflow

  1. add a file from IDE : maxime.php
  2. add it to git : git add maxime.php or all files with git add .
  3. edit the file then commit changes : git commit -m "my first commit"
  4. push them : git push origin master

Git Conflict

  1. create a new branch from master : git checkout -b evol/1
  2. edit the file :
<!DOCTYPE html>
<html>
<body class="toto">

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
  1. push the changes : git push origin evol/1
  2. create from master a other one : git checkout -b evol/2
  3. edit the file :
<!DOCTYPE html>
<html>
<body class="toto titi">

<h1><?php the_title(); ?></h1>
<p>My first paragraph.</p>

</body>
</html>
  1. push changes : git push origin evol/2
  2. we can change branches (content) as we want : git checkout evol/1
  3. on server, only get the modifications : git fetch -a
  4. to apply the new modifications : git pull -f
  5. finally merge the two branches on master :
    • go on master : git checkout master
    • merge branches : git merge evol/1 and git merge evol/2
  6. it results into a conflict :
    • edit the final modification into the file
    • stage changes : git add .
    • then commit them : git commit -m "Resolved merge conflict by incorporating both suggestions."

meetup-git's People

Contributors

maximeculea 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.