Skip to content

Commit 480fa53

Browse files
feat: complete the track
1 parent da4156f commit 480fa53

27 files changed

+401
-3
lines changed

hyperskill/13_gitman/01/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Objectives
2+
3+
Initialize an empty git repository inside the repository folder:
4+
5+
```bash
6+
git init
7+
git branch -m main
8+
```
9+
10+
Create a Python file named `main.py` and copy the code block above into it:
11+
12+
```python
13+
if __name__ == "__main__":
14+
print("Helo, worlld!")
15+
```
16+
17+
Add the changes to the staging area:
18+
19+
```bash
20+
git add main.py
21+
```
22+
23+
Commit the changes with the message `Hello, world`:
24+
25+
```bash
26+
git commit -m "Hello, world"
27+
```

hyperskill/13_gitman/01/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
if __name__ == "__main__":
2+
print("Helo, world!")

hyperskill/13_gitman/02/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Objectives
2+
3+
Create the `develop` branch using the `git-flow` command or create it with plain `git`:
4+
5+
```bash
6+
git switch -c develop
7+
```
8+
9+
Update the content of the main.py file to match the code block above:
10+
11+
```python
12+
def main() -> None:
13+
name = input("What's your name? ")
14+
print(f"Hello, {name}!")
15+
16+
17+
if __name__ == "__main__":
18+
main()
19+
```
20+
21+
Add changes to the staging area:
22+
23+
```bash
24+
git add main.py
25+
```
26+
27+
Commit the changes with the message `Greet user by the name`:
28+
29+
```bash
30+
git commit -m "Greet user by the name"
31+
```

hyperskill/13_gitman/03/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Objectives
2+
3+
Make changes to the content of the main.py file as shown in the code block above:
4+
5+
```python
6+
def main() -> None:
7+
name = input("What's your name? ")
8+
print(f"Hello, {name}!")
9+
print("Nice to meet you!")
10+
11+
12+
if __name__ == "__main__":
13+
main()
14+
```
15+
16+
Add changes to the staging area:
17+
18+
```bash
19+
git add main.py
20+
```
21+
22+
Edit the latest commit, and save the changes:
23+
24+
```bash
25+
git commit --amend
26+
```

hyperskill/13_gitman/04/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Objectives
2+
3+
Switch to the `main` branch:
4+
5+
```bash
6+
git switch main
7+
```
8+
9+
Create a new branch with the name `hotfix/no-more-typos`:
10+
11+
```bash
12+
git switch -c hotfix/no-more-typos
13+
```
14+
15+
Modify the `main.py` file to be the same as the code block above:
16+
17+
```python
18+
if __name__ == "__main__":
19+
print("Hello, world!")
20+
```
21+
22+
Add changes to the staging area:
23+
24+
```bash
25+
git add main.py
26+
```
27+
28+
Commit the changes with the message `Fix typos`:
29+
30+
```bash
31+
git commit -m "Fix typos"
32+
```
33+
34+
Switch to the `main` branch:
35+
36+
```bash
37+
git switch main
38+
```
39+
40+
Merge `hotfix/no-more-typos` branch to the `main`:
41+
42+
```bash
43+
git merge hotfix/no-more-typos
44+
```

hyperskill/13_gitman/05/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Objectives
2+
3+
First, go to the `develop` branch and start the rebase on `main` with the command `git rebase main`:
4+
5+
```bash
6+
git switch develop
7+
git rebase main
8+
```
9+
10+
Oops! It seems that git has problems with auto-merging the `main.py` file and warns you about it:
11+
12+
```plaintext
13+
CONFLICT (content): Merge conflict in main.py
14+
```
15+
16+
Open the `main.py` in an editor, fix the conflicts, and save the file. (Remove the lines with the conflict markers, <<<<<<<, =======, >>>>>>>).
17+
18+
Then add the file to the git index (staging area), commit, and continue the rebase:
19+
20+
```bash
21+
git add main.py
22+
git rebase --continue
23+
```

hyperskill/13_gitman/06/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Objectives
2+
3+
Switch to the `main` branch:
4+
5+
```bash
6+
git switch main
7+
```
8+
9+
Merge the develop branch to the `main`:
10+
11+
```bash
12+
git merge develop
13+
```
14+
15+
Create a new repository in your GitHub account and do not add any additional files like README.
16+
17+
Run the command `git remote add origin https://github.com/<your_username>/<your_repository>` in your terminal, where `<your_username>` is your nickname in Github, and `<your_repository>` is the name of the repository you've created.
18+
19+
Now push your local repository to the remote with the command `git push -u origin main`. Tests won't check this part, but we strongly recommend you publish your repo to a public resource to practice it.

hyperskill/13_gitman/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Gitman
2+
3+
My solution to the project [Gitman](https://hyperskill.org/projects/296?track=48) on [Hyperskill](https://hyperskill.org).
4+
5+
Each stage of the project is in a separate folder.

hyperskill/14_remo/01/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Objectives
2+
3+
Define a global variable with the name `user.name` and with the value `hyper`:
4+
5+
```bash
6+
git config --global user.name hyper
7+
```
8+
9+
Define a global variable with the name `user.email` and with the value `[email protected]`:
10+
11+
```bash
12+
git config --global user.email [email protected]
13+
```
14+
15+
Define a global variable with the name `init.defaultBranch` and with the value `main`:
16+
17+
```bash
18+
git config --global init.defaultBranch main
19+
```
20+
21+
Use the config command to view the user email:
22+
23+
```bash
24+
git config user.email
25+
```

hyperskill/14_remo/02/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
In the current working directory, initialize an empty Git repository:
4+
5+
```bash
6+
git init
7+
```
8+
9+
Add remote to your repository, with the name `origin` and with the URL `file:///tmp/git-bare`:
10+
11+
```bash
12+
git remote add origin file:///tmp/git-bare
13+
```

hyperskill/14_remo/03/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Create the first file:
4+
5+
```bash
6+
echo "print('Hello world')" > main.py
7+
```
8+
9+
Add content to the second file:
10+
11+
```bash
12+
echo "PASSWORD=Ax?bu75+33" >> .env
13+
```

hyperskill/14_remo/04/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Add a `.env` file to `.gitignore`:
4+
5+
```bash
6+
echo ".env" >> .gitignore
7+
```
8+
9+
Use the `git status` command with the suitable option to list the ignored files:
10+
11+
```bash
12+
git status --ignored
13+
```

hyperskill/14_remo/05/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Stage your files:
4+
5+
```bash
6+
git add .
7+
```
8+
9+
Commit the changes with the commit message `Initial commit`:
10+
11+
```bash
12+
git commit -m "Initial commit"
13+
```

hyperskill/14_remo/06/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Objectives
2+
3+
Push your changes to the remote:
4+
5+
```bash
6+
git push -u origin main
7+
git push origin main
8+
```

hyperskill/14_remo/07/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Objectives
2+
3+
List your remotes:
4+
5+
```bash
6+
git remote --verbose
7+
```

hyperskill/14_remo/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Remo
2+
3+
My solution to the project [Remo](https://hyperskill.org/projects/310?track=48) on [Hyperskill](https://hyperskill.org).
4+
5+
Each stage of the project is in a separate folder.

hyperskill/15_dolly/01/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Objectives
2+
3+
Use the suitable Git command to clone the repository:
4+
5+
```bash
6+
git clone file:///tmp/dolly
7+
```

hyperskill/15_dolly/02/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Change the directory to `dolly`:
4+
5+
```bash
6+
cd dolly
7+
```
8+
9+
List the files and directories inside `dolly`:
10+
11+
```bash
12+
ls
13+
```

hyperskill/15_dolly/03/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Create a branch with the name `dev-mul` and checkout to it:
4+
5+
```bash
6+
git switch -c dev-mul
7+
```
8+
9+
Use the Git `branch` command to see the available and current branches:
10+
11+
```bash
12+
git branch
13+
```

hyperskill/15_dolly/04/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Objectives
2+
3+
Use the `cat` command to view the content of the file mentioned in the Description stage:
4+
5+
```bash
6+
cat main.py
7+
```

hyperskill/15_dolly/05/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Objectives
2+
3+
Add the lines to the file using `echo` command:
4+
5+
```bash
6+
cat << EOF >> main.py
7+
def mul(num1, num2):
8+
return num1 * num2
9+
EOF
10+
```
11+
12+
View the content of the file:
13+
14+
```bash
15+
cat main.py
16+
```
17+
18+
Use the Git `status` command to display the current state of your working directory:
19+
20+
```bash
21+
git status
22+
```

hyperskill/15_dolly/06/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Objectives
2+
3+
Add the modified file to the staging area:
4+
5+
```bash
6+
git add main.py
7+
```
8+
9+
Commit your changes with the commit message: `New function multiplication`:
10+
11+
```bash
12+
git commit -m "New function multiplication"
13+
```

hyperskill/15_dolly/07/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Objectives
2+
3+
Check out the `main` branch:
4+
5+
```bash
6+
git switch main
7+
```
8+
9+
Merge the changes from the `dev-mul` branch:
10+
11+
```bash
12+
git merge dev-mul
13+
```
14+
15+
Delete the `dev-mul` branch:
16+
17+
```bash
18+
git branch -d dev-mul
19+
```

0 commit comments

Comments
 (0)