Я успешно использую GitLab с другим локальным разработчиком с небольшими проектами на C и MATLAB.
Работая из дома с помощью VPN, я запихнул большую программу LabVIEW в новый проект, чтобы я мог работать вместе с другимразработчик сайта.Разработчик клонировал проект и начал работу над веткой.
Проблема в том, что я не смог вытащить / получить эту ветку.GitLab показывает ветки и коммиты, которые сделал разработчик.
Я недолго пользуюсь git и поэтому могу просто быть глупым.
Git push: "fatal"origin 'не похоже на git-репозиторий - фатальный Не удалось прочитать из удаленного репозитория. "
Я рассмотрел это, в частности, но не сделал это работать, ниже приведены некоторые вещи, которые япопробовал.
$ git remote remove somelongcode
fatal: No such remote: 'somelongcode'
$ git remote add origin
usage: git remote add [<options>] <name> <url>
-f, --fetch fetch the remote branches
--tags import all tags and associated objects when fetching
or do not fetch any tag at all (--no-tags)
-t, --track <branch> branch(es) to track
-m, --master <branch>
master branch
--mirror[=(push|fetch)]
set up remote as a mirror to push to or fetch from
$ git remote master --prune
error: Unknown subcommand: master
usage: git remote [-v | --verbose]
or: git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>
or: git remote rename <old> <new>
or: git remote remove <name>
or: git remote set-head <name> (-a | --auto | -d | --delete | <branch>)
or: git remote [-v | --verbose] show [-n] <name>
or: git remote prune [-n | --dry-run] <name>
or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
or: git remote set-branches [--add] <name> <branch>...
or: git remote get-url [--push] [--all] <name>
or: git remote set-url [--push] <name> <newurl> [<oldurl>]
or: git remote set-url --add <name> <newurl>
or: git remote set-url --delete <name> <url>
-v, --verbose be verbose; must be placed before a subcommand
________________________
$ git fetch origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
________________________
$ git reset --hard origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not `in the working tree.`
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Я вижу удаленную ветку.Это самое обнадеживающее, по крайней мере, я вижу пульт, даже если я не могу синхронизироваться с локальным репозиторием
$ git ls-remote
From git@gitlab.com:group/project.git
somelongcode HEAD
somelongcode refs/heads/apploc
somelongcode refs/heads/master
Как вы видите локально, я не вижу ветку
$ git pull
From gitlab.com:group/project
* branch master -> FETCH_HEAD
Already up to date.
$ git branch
* master
$ git remote show origin
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.