在gitlab上创建项目后,没有显示仓库菜单,也看不到分支信息
这时,需要在本地创建好项目代码,然后在在项目代码的文件夹下,右键点击,使用git命令执行如下命令
Git global setup
git config --global user.name "wanga xiaofei"
git config --global user.email "1401431383@qq.com"
Create a new repository --克隆空代码到本地以及生成远程的主分支
git clone http://39.162.1.200:15001/13213161636/cs.git
cd cs
git switch -c main
touch README.md
git add README.md
git commit -m "add README"
git push -u origin main
Push an existing folder --推出本地项目代码
cd existing_folder
git init --initial-branch=main
git remote add origin http://39.162.1.200:15001/13213161636/cs.git
git add .
git commit -m "Initial commit"
git push -u origin main
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin http://39.162.1.200:15001/13213161636/cs.git
git push -u origin --all
git push -u origin --tags