上传代码到gitlab

安装好git后

1、选中上传文件夹右键选择Git Bash Here

 

 

2、首先执行命令

git config --global user.name"name"
$ git config --global user.email"XXX@qq.com"

3、执行命令

git init
git remote add origin XXX/xxx/xxx.git (去项目类获取链接)
git add .
git commit -m"初始提交"
git push -u origin master (上传到master分支,可以改为指定的分支)

git branch
-r 查看git分支 git push git pull git log -3 查看日志

 

posted @ 2022-07-14 11:44  sugoi  阅读(1015)  评论(0)    收藏  举报