git的用法

发布时间 2023-08-24 18:22:00作者: 等待1248

git clone xxxx.git

1,查看分支: git branch
2,切换分支: git checkout dev
3,查看文件修改情况: git status
4,添加上传的文件:git add productservice/*
5,备注信息:git commit -m 'test' 上传:git push -u origin master -f f强制上传。

git pull origin master 生成master分支;

6,指定用户和邮箱: git config --global user.name "yelujun"
git config --global user.email "root@client"

7,查看当前用户配置情况: git config --list
8,查看本地登录账号:git config user.name
9,指定目标库: git remote set-url origin git@******nd.git
或者 git init;git remote add origin git@******nd.git