$ git config --global user.name smartiqa
$ git config --global user.email info@smartiqa.com
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[user]
name = smartiqa
email = info@smartiqa.com
[init]
defaultBranch = develop
$ mkdir test_repository
$ cd test_repository/
$ git init
Initialized empty Git repository in /Users/smartiqa/test_repository/.git/
test_repository/.git
├── HEAD
├── branches
├── config
├── description
├── hooks
├── info
│ └── exclude
├── objects
│ ├── info
│ └── pack
└── refs
├── heads
└── tags
test_repository/
├── alpha.txt
└── num.txt
$ git status
On branch develop
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
alpha.txt
num.txt
nothing added to commit but untracked files present (use "git add" to track)
$ git add alpha.txt
$ git status
On branch develop
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: alpha.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
num.txt
ca87a297fe24e72165a6c462b2e1df12a01cbc34
alpha.txt ca87a297fe24e72165a6c462b2e1df12a01cbc34.
$ git add num.txt
$ git status
On branch develop
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: alpha.txt
new file: num.txt
$ git status
On branch develop
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: alpha.txt
new file: num.txt
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: num.txt
$ git add num.txt
$ git status
On branch develop
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: alpha.txt
new file: num.txt
$ git commit -m "Initial commit"
[develop (root-commit) 10962e7] Initial commit
2 files changed, 2 insertions(+)
create mode 100644 data/alpha.txt
create mode 100644 data/num.txt
<режим доступа> <тип объекта> <хэш объекта> <имя файла, из которого создан объект>.
test_repository
└───data
│ └─alpha.txt
│ └─num.txt
└─── outer.txt
100644 blob ca87a297fe24e72165a6c462b2e1df12a01cbc34 alpha.txt
100644 blob 81c545efebe5f57d4cab2ba9ec294c4b0cadf672 num.txt
040000 tree 09d20c0539d97b2a60d06db73135cda7dcac4121 data
100644 blob 5ef136008f1e8f921622f7eed1fe1925331c9665 outer.txt
tree c0d2cc3e13d34e7043d2afddb4af8867cc972741
author smartiqa <info@smartiqa.com@email> 1606261256 +0300
committer smartiqa <info@smartiqa.com@email> 1606261256 +0300
Initial commit
$ git commit -m “Initial commit”
[develop (root-commit) f98b4a7] initial commit
3 files changed, 3 insertions(+)
create mode 100644 data/alpha.txt
create mode 100644 data/num.txt
create mode 100644 outer.txt
test_repository
└───data
└─alpha.txt
└─num.txt
git status
On branch develop
nothing to commit, working tree clean
$ git status
On branch develop
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: data/alpha.txt
no changes added to commit (use "git add" and/or "git commit -a")
git add -A
git status
On branch develop
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: data/alpha.txt
$ git commit -m "change alpha.txt"
[develop 4117d58] change alpha.txt
1 file changed, 1 insertion(+), 1 deletion(-)
100644 blob 7e74e68b2a782a3aead46d987a63ca1c91091c13 alpha.txt
100644 blob 81c545efebe5f57d4cab2ba9ec294c4b0cadf672 num.txt
040000 tree 3b95bcd6d0a76177985b5d3b2fd046b48e9110ba data
tree 22d4301816880a569417c908ee00b2f6680efb33
parent 0790c287b727b43156de737f5840cb6584261830
author smartiqa <info@smartiqa.com> 1606271955 +0300
committer smartiqa <info@smartiqa.com> 1606271955 +0300
change alpha.txt
wild_animals
├── index.html
└── pictures
├── elephant.jpg
├── giraffe.jpg
└── paw_print.jpg
<!DOCTYPE html>
<html>
<head>
<title>Wild Animals Blog</title>
<meta charset="utf-8">
</head>
<body align=center>
<img width=100px src="pictures/paw_print.jpg">
<h1>Wild Animals</h1>
<small>- Blog about nature -</small>
<br>
<br>
<br>
<br>
<p>Let's talk about wild animals around the world:</p>
<h2>Giraffe</h2>
<img src="pictures/giraffe.jpg">
<p><b>Area:</b> Africa</p>
<p><b>Weight:</b> 900-1200kg</p>
<p><b>Height:</b> 6m</p>
<br>
<h2>Elehant</h2>
<img width=350px src="pictures/elephant.jpg">
<p><b>Area:</b> Africa, Asia</p>
<p><b>Weight:</b> 4000-7000kg</p>
<p><b>Height:</b> 3m</p>
<br>
</body>
</html>
pictures
├── elephant.jpg
├── giraffe.jpg
└── paw_print.jpg
mat_lib
├─docs
│ └─math_lib_docs.txt
│
└─pyfiles
└─factorial.py
└─test.py
└─trigonometry.py
This is the library which designation is to implement some math functions
def factorial(x):
ans = 1
if x < 0:
raise ValueError('x must be greater than 0')
for i in range(1, x+1):
ans *= i
return ans
from factorial import factorial as fct
def sin(x):
sin = 1 - (x**2/fct(2)) + (x**4/fct(4)) - (x**6/fct(6)) + (x**8/fct(8)) - (x**10/fct(10))
return round(sin, 5)
from trigonometry import sin
import math
pi = math.pi
print('pi:', pi)
for alpha in [0, pi, pi/2, pi/3, pi/4, pi/6]:
print(f'For angle: {0 if alpha == 0 else "pi/"+str(int(pi/alpha))}, Sine is ~ {sin(alpha)}')