我對git,gitLab很新。我正在嘗試下載一個項目(完成),編輯它(完成),並將新版本推送到唯一的主分支。我確實爲此保留了權利。Git首先拉和推到主問題
步驟I遵循:
1-I已經手動下載(從網頁GUI)從gitLab從只有主分支的項目。
2-我在本地對項目進行了修改。
3-我創建了一個新文件夾(gitCommit)。
4-我將編輯過的項目複製到gitCommit文件夾中,該文件夾現在保存着包含該項目的「TheDB」文件夾。
5-我打開終端:cd Desktop ..../gitCommit。現在我在「gitCommit」裏面。
6-我運行git初始化
Initialized empty Git repository in /Users/alex_fimm_dev/Desktop/Projects/FIMM/gitCommit/.git/
7-I運行:GIT中拉https://gitlab.com/TheDBdevs/TheDB.git主
remote: Counting objects: 2851, done.
remote: Compressing objects: 100% (2088/2088), done.
remote: Total 2851 (delta 1155), reused 2223 (delta 694)
Receiving objects: 100% (2851/2851), 14.21 MiB | 13.87 MiB/s, done.
Resolving deltas: 100% (1155/1155), done.
From https://gitlab.com/TheDBdevs/TheDB
* branch master -> FETCH_HEAD
8-I運行:GIT中添加。
9-I運行:git的承諾-m '的形式生成字段和驗證'
[master 1c7b506] form generator fields and validations
Committer: Alexander Thorarinsson <[email protected]>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
git config --global user.name "Your Name"
git config --global user.email [email protected]
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1198 files changed, 571617 insertions(+)
create mode 100644 TheDB/.gitignore
create mode 100644 TheDB/data_for_import/FO4 and 3 merged.xlsx
...
create mode 100644 TheDB/webapp/views/qrcodesetup.tt
create mode 100644 TheDB/webapp/views/questionnaire.tt
create mode 100644 TheDB/webapp/views/register.tt
10我運行:遠程Git添加起源https://gitlab.com/TheDBdevs/TheDB.git主
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
lm5-fim4-0G3QD:gitCommit alex_fimm_dev$ git push 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.
我在做什麼錯?
感謝這麼多的澄清,並指出後一個新的情況下,我會現在就試試這個 –