上傳本地工程到gitlab

2021-10-11 14:26:35 字數 2518 閱讀 5356

lijiaming@desktop-eeu0ri1 mingw64 /d/personal/專案/新唐mcu/projectmaster/ms51fb9ae (master)

$ ll

total 0

drwxr-xr-x 1 lijiaming 197121 0 9月 18 2019 document/

drwxr-xr-x 1 lijiaming 197121 0 9月 18 2019 library/

drwxr-xr-x 1 lijiaming 197121 0 9月 18 2019 sample_code/

(1)git init

(2)git add .

(3)git commit -m "initial code"

git remote add origin
ms51fb9ae是你即將要建立的遠端倉庫名,用下面的命令可以檢視是否關聯成功

$ git config -l

...remote.origin.url=

...

$ git push -u [email protected]:insight/ms51fb9ae.git

enumerating objects: 269, done.

counting objects: 100% (269/269), done.

delta compression using up to 8 threads

compressing objects: 100% (221/221), done.

writing objects: 100% (269/269), 1.62 mib | 12.76 mib/s, done.

total 269 (delta 104), reused 0 (delta 0), pack-reused 0

remote: resolving deltas: 100% (104/104), done.

remote:

remote:

remote: the private project insight/ms51fb9ae was successfully created.

remote:

remote: to configure the remote, run:

remote: git remote add origin [email protected]:insight/ms51fb9ae.git

remote:

remote: to view the project, visit:

remote:

remote:

remote:

to 10.10.2.1:insight/ms51fb9ae.git

* [new branch] master -> master

branch 'master'

set up to track remote branch 'master' from '[email protected]:insight/ms51fb9ae.git'

.

這樣子就成功在gitlab上的insight group裡面建立了ms51fb9ae這個倉庫,上傳的是master這個主分支,如果想上傳其它分支,可以加上分支名

$ git push -u [email protected]:insight/ms51fb9ae.git modbusrtu:modbusrtu

enumerating objects: 38, done.

counting objects: 100% (38/38), done.

delta compression using up to 8 threads

compressing objects: 100% (33/33), done.

writing objects: 100% (34/34), 207.88 kib | 6.50 mib/s, done.

total 34 (delta 4), reused 0 (delta 0), pack-reused 0

remote:

remote: to create a merge request for modbusrtu, visit:

remote: /merge_requests/new?merge_request%5bsource_branch%5d=modbusrtu

remote:

to 10.10.2.1:insight/ms51fb9ae.git

* [new branch] modbusrtu -> modbusrtu

branch 'modbusrtu'

set up to track remote branch 'modbusrtu' from '[email protected]:insight/ms51fb9ae.git'

.

其中,modbusrtu:modbusrtu —— 本地分支名:遠端分支名

gitlab上傳本地專案

使用http方式上傳 在本地專案的資料夾上滑鼠右擊 選擇 git bash here 在彈出的控制台中輸入 可以將本地專案上傳到gitlab的master分支下 如果未能上傳成功,有可能是上傳者的許可權不夠,不能直接上傳到master分支下 這時可以先建立乙個新的分支,將新分支上傳上去,然後提交合併...

上傳本地專案到git

1 到需要上傳的資料夾下,開啟gitbase 2 git init 3 git add 4 git commit m init 5 驗證許可權 首先在git bash中輸入 ssh keygen t rsa c youremail com 然後一路回車,這個會在當前使用者資料夾下,生成.ssh 資料...

上傳本地專案到github

先說一下額,本人菜鳥一枚,今天閒來無事,準備搗鼓搗鼓github,新手乙個一步一步來還是很重要的 git init git add 檔名 git commit m 備註 git remote add origin git github.com tawhh git 解決辦法 先輸入 git remot...