$ cat README.md
# Démonstration TSTN2 G2
Le dépôt de démonstration est ici
Une modification côté client
lauhub@MB-P--L _demo-G2 (main)
$ git diff README.md
diff --git a/README.md b/README.md
index f520e31..6c4660b 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
# Démonstration TSTN2 G2
Le dépôt de démonstration est ici
+
+Une modification côté client
+
lauhub@MB-P--L _demo-G2 (main)
$ nano README.md
lauhub@MB-P--L _demo-G2 (main)
$ git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")
lauhub@MB-P--L _demo-G2 (main)
$ git add README.md
lauhub@MB-P--L _demo-G2 (main)
$ git commit -m "Modification côté client du fichier README.md"
[main c603c2f] Modification côté client du fichier README.md
1 file changed, 3 insertions(+)
lauhub@MB-P--L _demo-G2 (main)
$ git push
To github.com:tstn1-23-24-g2/_demonstration.git
! [rejected] main -> main (fetch first)
error: failed to push some refs to 'github.com:tstn1-23-24-g2/_demonstration.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
lauhub@MB-P--L _demo-G2 (main)
$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 1006 bytes | 335.00 KiB/s, done.
From github.com:tstn1-23-24-g2/_demonstration
06fcd11..fbfd5d9 main -> origin/main
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Auto-merging README.md
CONFLICT (content): Merge conflict in README.md
Automatic merge failed; fix conflicts and then commit the result.
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ cat README.md
# Démonstration TSTN2 G2
Le dépôt de démonstration est ici
<<<<<<< HEAD
Une modification côté client
||||||| 06fcd11
=======
Une modification côté serveur
>>>>>>> fbfd5d9bbfa571f2a742de6feb8cbd854095e2a9
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ cat README.md
# Démonstration TSTN2 G2
Le dépôt de démonstration est ici
<<<<<<< HEAD
Une modification côté client
||||||| 06fcd11
=======
Une modification côté serveur
>>>>>>> fbfd5d9bbfa571f2a742de6feb8cbd854095e2a9
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ nano README.md
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: README.md
no changes added to commit (use "git add" and/or "git commit -a")
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git diff
diff --cc README.md
index 6c4660b,4fd130b..0000000
--- a/README.md
+++ b/README.md
@@@ -2,5 -2,5 +2,6 @@@
Le dépôt de démonstration est ici
+Une modification côté client
+ Une modification côté serveur
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git add README.md
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git status
On branch main
Your branch and 'origin/main' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: README.md
lauhub@MB-P--L _demo-G2 (main|MERGING)
$ git commit -m "Fusion des modifications côté client et côté serveur"
[main b8dc745] Fusion des modifications côté client et côté serveur
lauhub@MB-P--L _demo-G2 (main)
$ git push
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 642 bytes | 642.00 KiB/s, done.
Total 6 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
To github.com:tstn1-23-24-g2/_demonstration.git
fbfd5d9..b8dc745 main -> main
lauhub@MB-P--L _demo-G2 (main)
$