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
3 changes: 3 additions & 0 deletions file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
First commit
Second commit
Third commit
Binary file added lab3/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lab3/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lab3/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions lab3/submission3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Lab3

## Task 1

1. try `git cat-file`
![alt text](1.png)

## Task 2

1. make all commits:
- file
```
First commit
Second commit
Third commit
```
![alt text](2.png)
2. `git reflog`
![alt text](3.png)

3. Explanation
- `git reset`: Adjusts the position of HEAD (the current branch pointer) to a specified commit, with different effects depending on the mode selected:
- **soft**: Moves HEAD to the target commit without affecting the staging area (index) or working directory (tree).
- **mixed** (default): Moves HEAD and updates the staging area to match the target commit, without changing the working directory.
- **hard**: Moves HEAD, updates the staging area, and modifies the working directory to match the target commit.
- `git reflog`: Logs all movements of HEAD (commits, resets, checkouts, and rebases) on the current branch, allowing you to track recent changes to branch history.
- `HEAD~<int>` A reference to a commit relative to HEAD
- `HEAD~3` Refers to three commits before HEAD