-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit-repo.sh
More file actions
executable file
·28 lines (24 loc) · 938 Bytes
/
init-repo.sh
File metadata and controls
executable file
·28 lines (24 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# Данный скрипт следует вызвать после первого клонирования
# репозитория. Подробная информация:
# https://cpp-kt.github.io/course/instruction.html
set -euo pipefail
IFS=$' \t\n'
if git remote | grep --quiet upstream; then
echo "init-repo.sh was already done on this repository."
exit 1
fi
if [ -n "$(git status --untracked-files=no --porcelain)" ]; then
echo "init-repo.sh is intended to work on a freshly created repository."
echo "The working copy of this reposity is dirty. Please checkout or"
echo "stash changes and run ./init-repo.sh again."
exit 1
fi
git remote add upstream git@github.com:CPP-KT/persistent-set-task.git
git fetch upstream
git branch feedback upstream/master
git push -u origin feedback:feedback
git checkout feedback
git branch -f master feedback
git checkout master
git push -f origin master