1.初始化
git init
2.将项目的所有文件添加到仓库中,如果想添加某个特定的文件,只需把.换成特定的文件名即可.
git add .
3.将add的文件commit到仓库
git commit -m "文件名"
4.初次使用会出现,按要求输入邮箱和名字,重新第3步
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
5.查看分支
git branch -a
6.创建新分支wu
git branch wu
7.切换分支
git checkout wu
8.关联远程仓库
git remote add origin http://xxx.git
9.上传分支
git push origin wu
git上传本地文件至gitlab
最新推荐文章于 2023-08-14 16:20:06 发布