Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ ENV/
### VirtualEnv template
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
Expand Down
79 changes: 79 additions & 0 deletions 07_git_exercises/eliranshriki_ex1/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
part one:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good



# cp /home/elirans/PycharmProjects/devOpsJan22/07_git_exercises/init.sh /home/elirans/PycharmProjects/git_ex_1
# echo "1" > abc.txt | color red
# git add abc.txt | color green
# git commit | in the commit "git ex1"
# echo "2" >> abc.txt | color blue
# git diff
# because the changes are not staged yet
# unknown revision or path not in the working tree
# nothing because there is no new difference
# git diff main
# the same but the main will be with a new line
# because we didn't use the commit cmd
# git reset --hard

part 2
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

# git branch -a

List of branch
# bugfix/fix_readme_typo
# bugfix/open_kibana_port
# dev
# feature/data_retention_policy
# feature/elasticsearch_helm_chart
# feature/upgrade_angular_version
# feature/version1
# feature/version2
# * main
# reset_question

# git checkout -b feature/lambda_migration
# git merge feature/version1
# the changes
#) Updating 7df979d..f18a83b
#) Fast-forward
#) .env | 0
#) app.py | 4 ++--
#) config.json | 0
#) 3 files changed, 2 insertions(+), 2 deletions(-)
#) create mode 100644 .env
#) create mode 100644 config.json

# git log
#
#commit f18a83bbd890e6d63c63c3181625d36740e98d1e (HEAD -> feature/lambda_migration, feature/version1)
Author: John Doe <john.doe@microsoft.com>
Date: Sun May 15 14:10:02 2022 +0300

Restrict the extensions that can be disabled

commit a312226d3d07e16630b9a8e78c5f2fa5cd2a576b
Author: John Doe <john.doe@microsoft.com>
Date: Sun May 15 14:10:02 2022 +0300

use correct lock type in reconnect()
#

# git switch main
#git checkout -b feature/lambda_migration2
# the file config.json and .env
# the order is important because if there is some script or fill that need to add before the second then it will be conflict or an error
#



part 3
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

# touch take.txt
# git add take.txt
# the error is that need to commit the changes adn in checkout will be overwritten
# with force checkout the change of the file was overwritten
#git checkout reset_question
#

#A) file 10.txt went back one stage after the "add" command and before the commit commend
#B) file "10.txt" and "9.txt" went back to a stage before the add command
#C) delete the file "8.txt" what was the last push
#D) delete the last commit and changes, and you need to add new commit
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good answers, so what HEAD~1 mean?