Git命令行指令

简介: 命令行指令Git 全局设置 git config --global user.name "Administrator" git config --global user.email "admin@example.

命令行指令
Git 全局设置

git config --global user.name "Administrator"
git config --global user.email "admin@example.com"

创建密钥

[root@sannian wode.bak]# ssh-keygen -t rsa -C "3203054@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:+ZcOObf7XrqLx/diWI2Y45P1RkegWpKWkguQgkYJqa4 3203054@qq.com
The key's randomart image is:
+---[RSA 2048]----+
|++.  .           |
|oo. o         .  |
|o  . .   . o . . |
|.     . o.= o   .|
|.      .S+ + o + |
| .      ....+.+ +|
|.         =.+B oo|
|E          *=o=o+|
|            =B**o|
+----[SHA256]-----+




版本库

git clone git@47.99.145.156:front/eatjoys-front-min.git
cd eatjoys-front-min
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

已存在的文件夹

cd existing_folder
git init
git remote add origin git@47.99.145.156:front/eatjoys-front-min.git
git add .
git commit -m "Initial commit"
git push -u origin master

已存在的 Git 版本库

cd existing_repo
git remote rename origin old-origin
git remote add origin git@47.99.145.156:front/eatjoys-front-min.git
git push -u origin --all
git push -u origin --tags
相关文章
|
2月前
|
开发工具 git
常用的git指令
常用的git指令
44 0
|
3月前
|
前端开发 算法 开发工具
Git分支批量清理利器:自定义命令行插件实战
Git分支批量清理利器:自定义命令行插件实战
50 0
|
4月前
|
Java Shell 开发工具
Git快速入门+常用指令
Git快速入门+常用指令
34 0
|
4月前
|
安全 开发工具 git
三分钟学完Git版本控制常用指令
Git本地有三个工作区域:工作目录(Working Directory)、暂存区(Stage/Index)、资源库(Repository或Git Directory)。如果在加上远程的git仓库(Remote Directory)就可以分为四个工作区域。文件在这四个区域之间的转换关系如下:
30 0
三分钟学完Git版本控制常用指令
|
5月前
|
Shell 开发工具 git
Git获取本地仓库及基础操作指令
Git获取本地仓库及基础操作指令
39 0
|
7月前
|
移动开发 小程序 Linux
【Linux】Linux和Window下\r与\n的区别、git命令行的使用
目录 1. 回车换行符在Window下和在Linux下的区别: 1.1回车换行符: 1. 2.行缓冲区打印: 1.3进度条小程序 :
111 0
|
7月前
|
存储 安全 网络安全
关于使用 git 命令行时遇到的错误消息 unable to get local issuer certificate
关于使用 git 命令行时遇到的错误消息 unable to get local issuer certificate
149 0
|
22天前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
29 0
|
2月前
|
开发工具 git
git简易的命令行入门教程
git简易的命令行入门教程
11 0
|
2月前
|
开发工具 git
git简易的命令行入门教程
git简易的命令行入门教程
31 0

相关实验场景

更多