https://github.com/maximeculea/meetup-git
Meetup sur GIT
https://github.com/maximeculea/meetup-git
git learning learning-git meetup wordpress
Last synced: 4 months ago
JSON representation
Meetup sur GIT
- Host: GitHub
- URL: https://github.com/maximeculea/meetup-git
- Owner: MaximeCulea
- License: other
- Created: 2018-12-17T21:58:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T18:24:39.000Z (over 2 years ago)
- Last Synced: 2023-03-02T11:55:48.658Z (over 2 years ago)
- Topics: git, learning, learning-git, meetup, wordpress
- Language: PHP
- Homepage: https://maximeculea.fr
- Size: 22.2 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# Introduction au gestionnaire de version GIT
## WP Meetup Geneva
- Slides : https://slides.com/maximeculea/meetup-wp-geneve-introduction-git
- YouTube vidéo : coming soon## WP Meetup Paris
- Slides : https://slides.com/maximeculea/meetup-wordpress-git
- YouTube vidéo : https://www.youtube.com/watch?v=-VFoqwbQSM8## General git workflow
1. add a file from IDE : `maxime.php`
2. add it to git :git add maxime.php
or all files withgit 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 :
```My First Heading
My first paragraph.
```
3. push the changes :git push origin evol/1
4. create from master a other one :git checkout -b evol/2
5. edit the file :
```My first paragraph.
```
6. push changes :git push origin evol/2
7. we can change branches (content) as we want :git checkout evol/1
8. on server, only get the modifications :git fetch -a
9. to apply the new modifications :git pull -f
10. finally merge the two branches on master :
- go on master :git checkout master
- merge branches :git merge evol/1
andgit merge evol/2
11. 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."