As soon as initial translation is completed, repos.git is ready to serve users. Pushes to repos.git will be translated to SVN and commits to SVN will be translated to Git.
Note, that repos.git is so called ‘bare’ Git repository, i.e. it does not contain working tree.
Install svn2git on a local workstation rather than the GitLab server
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) {
byte[] rawBytes = Charset.forName("Windows-1251")
.encode("ГђВќГђВµ ГђВЅГђВ°").array();
String asUTF8 = StandardCharsets.UTF_8
.decode(ByteBuffer.wrap(rawBytes)).toString();
byte[] bytes = StandardCharsets.ISO_8859_1
.encode(asUTF8).array();
String result = StandardCharsets.UTF_8
.decode(ByteBuffer.wrap(bytes)).toString();
System.out.println(result); // Не на ...йден...?
}
}exists and is not an empty directoryКлонировать мы должны либо в пустой каталог, либо в ещё не существующий.
git reset --hard#### LibGit2Sharp
using (var repo = new Repository("path/to/your/repo"))
{
Commit currentCommit = repo.Head.Tip;
repo.Reset(ResetMode.Hard, currentCommit);
} # клонируем репозиторий в соседний каталог
# иначе придётся использовать ключ --force
git clone --no-local . ../clonerepo/
# переходим в свежий клон
cd ../clonerepo
# чистим
git filter-repo --path "path/to/file" --invert-paths
# проверим что файл исчез
git log --oneline --name-status -- "path/to/file"Коммиты в гите неизменяемые, но мы можем их пересоздать заново. Фактически получится новый репозиторий, но сохранится история. Всем участникам проекта придётся клонировать новый проект заново.