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
相关文章
|
8月前
|
缓存 开发工具 git
git最实用指令
git最实用指令
33 1
|
9月前
|
开发工具 git
常用的git指令
常用的git指令
87 0
|
9月前
|
前端开发 算法 开发工具
Git分支批量清理利器:自定义命令行插件实战
Git分支批量清理利器:自定义命令行插件实战
145 0
|
9月前
|
安全 开发工具 git
三分钟学完Git版本控制常用指令
Git本地有三个工作区域:工作目录(Working Directory)、暂存区(Stage/Index)、资源库(Repository或Git Directory)。如果在加上远程的git仓库(Remote Directory)就可以分为四个工作区域。文件在这四个区域之间的转换关系如下:
62 0
三分钟学完Git版本控制常用指令
|
9月前
|
Java Shell 开发工具
Git快速入门+常用指令
Git快速入门+常用指令
73 0
|
6月前
|
开发工具 git
成功解决:fatal: detected dubious ownership in repository at ‘E:/workspace/CSMarket‘。如何使用git工具通过命令行的形式
这篇文章分享了作者在使用Git工具初始化本地仓库时遇到的权限问题,提供了通过命令行解决Git仓库权限问题的方案,并介绍了如何使用Git命令行初始化项目、添加文件、提交以及关联远程仓库的步骤。
成功解决:fatal: detected dubious ownership in repository at ‘E:/workspace/CSMarket‘。如何使用git工具通过命令行的形式
|
8月前
|
开发工具 git
git常用指令 , 配置git仓库
git常用指令 , 配置git仓库
|
8月前
|
开发工具 git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
MAC如何使用Git命令行上传本地项目及理解,failed to push some refs to ‘https://gitee.com/brother-barking/spxx.git
|
8月前
|
缓存 开发工具 数据安全/隐私保护
mac git命令行操作 git push pull 逻辑
mac git命令行操作 git push pull 逻辑
108 1
|
9月前
|
开发工具 git
常规git指令速查表
【5月更文挑战第10天】`git`命令速查:常用工作流:创建-浏览-更改-还原-更新-分支-提交-发布。查看状态`git status`,历史记录`git log`。更多远程操作如`fetch`,`pull`,`push`,分支管理与标签使用等。
90 6