1 Star 0 Fork 0

王伟军 / 学习笔记

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Git.md 1.84 KB
一键复制 编辑 原始数据 按行查看 历史
王伟军 提交于 2023-03-07 13:22 . 2023-3-7

Git命令

git config --global user.name #name 设置用户签名

git config --global user.email #email 设置用户邮箱

+++

git init 初始化本地库

git status 本地库状态

$ git status	本地库状态
On branch master

No commits yet	

nothing to commit (create/copy files and use "git add" to track)	# 还没有文件

$ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        test.txt

nothing added to commit but untracked files present (use "git add" to track)

git add #filename


git config --list #查看git配置信息

image-20230307101516684

查看用户名,密码和邮箱命令:

git config user.name 
git config user.password 
git config user.email 

设置或修改用户名,密码和邮箱命令:

git config user.name "freedom"
git config user.password "123456"
git config user.email "12345678@qq.com"

Git分支

切换分支

git checkout branchName

查看分支

git branch -a

使用码云

  1. 注册登录,完善信息
  2. 设置本机绑定SSH密钥,实现免密码登录
# 进入C:\Users\Admin\.ssh
# 生成公钥
ssh-keygem -t rsa

image-20230222173117354

  1. 添加密钥到码云

image-20230222173328690

  1. 使用码云创建自己的仓库

许可证:开源是否可以随意转载,开源但不能商业使用、不能转载,...限制

  1. 克隆自己的仓库

image-20230222175655348

Idea集成Git

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/junyyds/study-notes.git
git@gitee.com:junyyds/study-notes.git
junyyds
study-notes
学习笔记
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891