You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
					
						
							3.2 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							3.2 KiB
						
					
					
				免密设置
第一步 生成密钥对
查看你的用户目录下是否有 .ssh 目录,如果有再看下是否存在 rsa 密钥对文件。
如果有跳过这一步,直接进入下一步。
ssh-keygen -t rsa -b 2048[/4096] -C "<comment>"
按回车
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
设置口令:
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
第二步 添加 ssh 密钥
使用
控制台操作
首先: 自己电脑上需要安装 git
Git - Downloading Package (git-scm.com)
安装完成后,电脑会多出 git 控制台工具。
 另外,也可以在控制台输入
另外,也可以在控制台输入 git,会输出下面信息

克隆项目
点击 克隆
 使用 SSH 克隆,点后面的复制链接:
然后到你的工作目录,打开控制台:
使用 SSH 克隆,点后面的复制链接:
然后到你的工作目录,打开控制台:
 结果:
结果:
添加文件和提交
下面提交:
 这时 文件提交到你的本地仓库,要想提交到远端仓库,还需要push
这时 文件提交到你的本地仓库,要想提交到远端仓库,还需要push
以上就是常用的git 操作。














