Skip to content

Conversation

@AlexeyMihaylovDev
Copy link
Collaborator

git_ex1 from alexeymihaylovdev

5.blue
6.git diff main
7. because i didn't stages (git add "files") files after last commit
8. stage2 is fail argument
Copy link
Owner

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

14. first time we see abc.txt after commited (green)
second time we see abc.txt working tree (red)

--------------------Resolve conflicts----------------
Copy link
Owner

Choose a reason for hiding this comment

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

Good


6. Yes - we have commits Marge branch

--------------------------cherry-pick-------------------
Copy link
Owner

Choose a reason for hiding this comment

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

Good

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
Copy link
Owner

Choose a reason for hiding this comment

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

and it stays in the index as well


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.
Copy link
Owner

Choose a reason for hiding this comment

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

great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants