-
Notifications
You must be signed in to change notification settings - Fork 6
git_ex1/AlexeyMihaylovDev #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4c8d764
187678d
d4a77f1
d89926d
c673bbb
007a1bc
e92e0d7
b05a2e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| 1. create file | ||
| 2. red | ||
| 3.after git add (index ) - green color | ||
| # 4. writing git commit -m "add 1 to abc.txt file" | ||
| 5.blue | ||
| 6.git diff main | ||
| 7. because i didn't stages (git add "files") files after last commit | ||
| 8. stage2 is fail argument | ||
| 10. doesn't print anything, because git diff shows the difference in between the index and the working tree. | ||
| 11. git diff --cached | ||
| 13.no, git diff --staged --> only show changes to files in the "staged" area | ||
| git diff main ---> show all changes to tracked files | ||
|
|
||
| 14. first time we see abc.txt after commited (green) | ||
| second time we see abc.txt working tree (red) | ||
|
|
||
| --------------------Resolve conflicts---------------- | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good |
||
|
|
||
| 1. git branch | ||
| bugfix/fix_readme_typo | ||
| bugfix/open_kibana_port | ||
| dev | ||
| feature/data_retention_policy | ||
| feature/elasticsearch_helm_chart | ||
| feature/lambda_migration (my new branch) | ||
| feature/upgrade_angular_version | ||
| feature/version1 | ||
| feature/version2 | ||
| * main | ||
| reset_question | ||
|
|
||
| 6. Yes - we have commits Marge branch | ||
|
|
||
| --------------------------cherry-pick------------------- | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good |
||
| 4. (1) config.json (2) .env | ||
| 5. yes, this is important because commits can be related to each other | ||
|
|
||
| -----------------------Changes in working tree and switch branches------------- | ||
| 3. git checkout problem - 1. Force checkout 2. Smart checkout 3. Don't checkout | ||
| 5. No | ||
| 6. No , remove my changes in indexing and working tree | ||
|
|
||
| ------------------------Reset----------------------- | ||
| 2.1 git reset --soft HEAD~1 - remove the last commit from the current branch, but the file changes will stay in your working tree | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and it stays in the index as well |
||
| 2.2 git reset --mixed HEAD~1 - remove the last commit from the current branch but still keep the changes in your working tree but not on the index | ||
| 2.3 git reset --hard HEAD~1 - lose all uncommited changes and all untracked files | ||
|
|
||
| 2.4 git revert HEAD~1 - If you have already made your commits public, you will want to create a new commit which will "revert" the changes you made in "one" commits before HEAD. | ||
|
|
||
| 3. HEAD~1 means that you want to reset the HEAD (the last commit) to one commit before in the log history. | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a valid argument, but there is no branch called
stage2