From cff37e37701b95c86f73a6adc0d2b636c4806e3a Mon Sep 17 00:00:00 2001 From: Yuval Date: Sun, 8 May 2022 16:13:51 +0300 Subject: [PATCH 1/6] readme --- 07_git_exercises/Yuval_ex1/README | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 07_git_exercises/Yuval_ex1/README diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README new file mode 100644 index 00000000..ca2d2190 --- /dev/null +++ b/07_git_exercises/Yuval_ex1/README @@ -0,0 +1,28 @@ +Git Basics + +1. Red +2. green +3. blue +4. get diff main (master) +5 . because i have not added abc.txt to the index +6. git diff stage2 is and invalid command. +7. gitt diff prints nothing because there is no difference present between working +copy and the index . +8. git diff --staged +No git diff staged will compare index and master on the other hand, +git diff main will also compare the changes done in working copy +9. one line will represent changes that are committed and the other will represent +changes that are not staged for commit. + +Resolve conflicts: +yes ther are new commits by jhon and nadella : + +*use correct lock type in reconnect() John Doe 5/5/2022 8:04 PM +*John's changes for app.py John Doe 5/5/2022 8:04 PM +*Nayaran's changes for app.py Narayan Nadella 5/5/2022 8:04 PM +*Restrict the extensions that can be disabled John Doe 5/5/2022 8:04 PM + +Cherry picking +1. files by the name of .env and config.json have been added. +2. yes because the first commit may create a file that is later will be updated by the 2nd commit and apply changes. +vice versa will not work (common logic ) From 7e80f122bb82f91cda749b63ec9980551d8e951b Mon Sep 17 00:00:00 2001 From: Yuval Date: Sat, 21 May 2022 18:45:35 +0300 Subject: [PATCH 2/6] readme 2 --- 07_git_exercises/Yuval_ex1/README | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README index ca2d2190..987e4249 100644 --- a/07_git_exercises/Yuval_ex1/README +++ b/07_git_exercises/Yuval_ex1/README @@ -15,7 +15,7 @@ git diff main will also compare the changes done in working copy changes that are not staged for commit. Resolve conflicts: -yes ther are new commits by jhon and nadella : +yes there are new commits by jhon and nadella : *use correct lock type in reconnect() John Doe 5/5/2022 8:04 PM *John's changes for app.py John Doe 5/5/2022 8:04 PM @@ -26,3 +26,9 @@ Cherry picking 1. files by the name of .env and config.json have been added. 2. yes because the first commit may create a file that is later will be updated by the 2nd commit and apply changes. vice versa will not work (common logic ) + +Changes in working tree and switch branches +1. there is smart checkout and force checkout +2. yes, Branch Dev has the new file with changes. +3. no, the new file with some new lines is not in the previous branch. + Force Checkout, is transferring the new changes to the other branch by force. \ No newline at end of file From c6280509e2d8b4210fe73d907cf08cf6dac5be5d Mon Sep 17 00:00:00 2001 From: Yuval Date: Sat, 21 May 2022 19:05:46 +0300 Subject: [PATCH 3/6] readme 3 --- 07_git_exercises/Yuval_ex1/README | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README index 987e4249..0d488ff8 100644 --- a/07_git_exercises/Yuval_ex1/README +++ b/07_git_exercises/Yuval_ex1/README @@ -28,7 +28,20 @@ Cherry picking vice versa will not work (common logic ) Changes in working tree and switch branches -1. there is smart checkout and force checkout -2. yes, Branch Dev has the new file with changes. +1. there is smart checkout and force checkout and don't checkout. +2. no. 3. no, the new file with some new lines is not in the previous branch. - Force Checkout, is transferring the new changes to the other branch by force. \ No newline at end of file + Force Checkout, is removing any uncommitted changes. + + resetting: + +git reset soft: + uncommitted changes, changes are left staged (index). +git reset mixed: +(default): uncommitted + unstage changes, changes are left in working tree. +git reset hard: + uncommitted + unstage + delete changes, nothing left +git revert HEAD~1: +Revert changes. + +HEAD~1 - Moving back 1 gen \ go back 1 commit from HEAD \ No newline at end of file From 30c6d530f6e16397ec22956f6603950c8fc32b7e Mon Sep 17 00:00:00 2001 From: Yuval Date: Sat, 21 May 2022 19:11:56 +0300 Subject: [PATCH 4/6] readme 4 --- 07_git_exercises/Yuval_ex1/README | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README index 0d488ff8..d6214d8c 100644 --- a/07_git_exercises/Yuval_ex1/README +++ b/07_git_exercises/Yuval_ex1/README @@ -37,11 +37,13 @@ Changes in working tree and switch branches git reset soft: uncommitted changes, changes are left staged (index). + file 10 is in uncommitted stage. git reset mixed: (default): uncommitted + unstage changes, changes are left in working tree. +the files 9 and 10 are red and they are untracked git reset hard: uncommitted + unstage + delete changes, nothing left + file 8 is removed git revert HEAD~1: Revert changes. - -HEAD~1 - Moving back 1 gen \ go back 1 commit from HEAD \ No newline at end of file +file 6 is removed and change commited. From b3412d92291fd1f10e383fe5e22438869e84518f Mon Sep 17 00:00:00 2001 From: Yuval Date: Sat, 21 May 2022 19:18:40 +0300 Subject: [PATCH 5/6] readme 4 commit fix --- 07_git_exercises/Yuval_ex1/README | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README index d6214d8c..f59497db 100644 --- a/07_git_exercises/Yuval_ex1/README +++ b/07_git_exercises/Yuval_ex1/README @@ -16,11 +16,17 @@ changes that are not staged for commit. Resolve conflicts: yes there are new commits by jhon and nadella : - -*use correct lock type in reconnect() John Doe 5/5/2022 8:04 PM -*John's changes for app.py John Doe 5/5/2022 8:04 PM -*Nayaran's changes for app.py Narayan Nadella 5/5/2022 8:04 PM -*Restrict the extensions that can be disabled John Doe 5/5/2022 8:04 PM +bugfix/fix_readme_typo + bugfix/open_kibana_port + dev + feature/data_retention_policy + feature/elasticsearch_helm_chart + feature/lambda_migration + feature/upgrade_angular_version + feature/version1 + feature/version2 +* main + reset_question Cherry picking 1. files by the name of .env and config.json have been added. From 8cffe7cbb70057e4ba71ed7f561e654fa9623d66 Mon Sep 17 00:00:00 2001 From: Yuval Date: Sat, 21 May 2022 19:21:49 +0300 Subject: [PATCH 6/6] readme 4 commit reset --- 07_git_exercises/Yuval_ex1/README | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/07_git_exercises/Yuval_ex1/README b/07_git_exercises/Yuval_ex1/README index f59497db..43353e86 100644 --- a/07_git_exercises/Yuval_ex1/README +++ b/07_git_exercises/Yuval_ex1/README @@ -41,15 +41,18 @@ Changes in working tree and switch branches resetting: -git reset soft: +1.git reset soft: uncommitted changes, changes are left staged (index). file 10 is in uncommitted stage. -git reset mixed: +2.git reset mixed: (default): uncommitted + unstage changes, changes are left in working tree. the files 9 and 10 are red and they are untracked -git reset hard: +3.git reset hard: uncommitted + unstage + delete changes, nothing left file 8 is removed -git revert HEAD~1: +4.git revert HEAD~1: Revert changes. file 6 is removed and change commited. + +5. HEAD~1 meaning, return back by 1 gen. +