# Github **Published by:** [Sk1fas](https://paragraph.com/@sk1fas/) **Published on:** 2024-02-22 **URL:** https://paragraph.com/@sk1fas/github ## Content #!/bin/bashСоздание файлаecho "Hello, world!" > file.txtИнициализация git-репозиторияgit initПервый коммитgit add file.txt git commit -m "Initial commit"Генерация случайных изменений файла и коммитов (Цельный блок команд)for ((i=1; i<=130; i++)) doРандомное изменение файлаecho "Random change $i" >> file.txtДобавление изменений и коммитgit add file.txt git commit -m "Commit $i"Получение предыдущей датыprev_date=$(date -d "$prev_date -1 day" +%Y-%m-%d)Изменение даты последнего коммитаGIT_COMMITTER_DATE="$prev_date 12:00:00" git commit --amend --no-edit --date "$prev_date 12:00:00"Запоминание текущей даты для следующего циклаprev_date=$prev_date done ## Publication Information - [Sk1fas](https://paragraph.com/@sk1fas/): Publication homepage - [All Posts](https://paragraph.com/@sk1fas/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@sk1fas): Subscribe to updates