gitlab的git命令行操作

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ mkdir ~/.ssh
mkdir: cannot create directory ‘/c/Users/Administrator/.ssh’: File exi                                                                               sts

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ cd ~/.ssh

[email protected] MINGW64 ~/.ssh
$ git config --global user.name "XX"

[email protected] MINGW64 ~/.ssh
$ git config --global user.email "XX@lifeat.cn"

[email protected] MINGW64 ~/.ssh
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:VMyQbkP6olb8oXXvfwsu/L35P5NTnw7SEhh1OEIvuHM 190438@lifeat.cn
The key‘s randomart image is:
+---[RSA 2048]----+
|        o*....   |
|        +o=o.    |
|       =.o...    |
|      ..= +      |
|     . =SE .     |
|      + * . o   .|
|     o = o.+ +  =|
|    o . .  o= +*+|
|   .       [email protected]|
+----[SHA256]-----+

[email protected] MINGW64 ~/.ssh

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git config --global user.name "XX"

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git config --global user.email "[email protected]"

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git init
Reinitialized existing Git repository in F:/BI/bi/二期/脚本/.git/

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git remote add origin ssh://[email protected]:65508/data-center/hopsonone/                                                                         dp-data-analysis/easylife_data_analysis.git
fatal: remote origin already exists.

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git remote add o ssh://[email protected]:65508/data-center/hopsonone/dp-da                                                                         ta-analysis/easylife_data_analysis.git

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git add dws_broker_reward.sh dws_should_solid_knot_fc_ac.sh dws_total_amou                                                                         nt.sh

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git commit -m "remote-shell"
[master (root-commit) 3730f82] remote-shell
warning: LF will be replaced by CRLF in dws_broker_reward.sh.
The file will have its original line endings in your working directory.
 3 files changed, 1170 insertions(+)
 create mode 100644 dws_broker_reward.sh
 create mode 100644 dws_should_solid_knot_fc_ac.sh
 create mode 100644 dws_total_amount.sh

[email protected] MINGW64 /f/BI/bi/二期/脚本 (master)
$ git push -u o master
The authenticity of host ‘[git.hopson.io]:65508 ([47.94.203.190]:65508)‘ can                                                                         ‘t be established.
ECDSA key fingerprint is SHA256:CRCRBb4FwTO0TNfqlBA6wBvRW+OKU4pc2mULCqbxMmk.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[git.hopson.io]:65508,[47.94.203.190]:65508‘ (EC                                                                         DSA) to the list of known hosts.
Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 7.26 KiB | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To ssh://[email protected]:65508/data-center/hopsonone/dp-data-analysis/easy                                                                         life_data_analysis.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from o.

原文地址:https://www.cnblogs.com/shengyang17/p/12125309.html

时间: 2024-08-01 20:04:36

gitlab的git命令行操作的相关文章

3.Git 命令行操作

1.Git 命令行操作(本地库操作): 1.1. 创建本地库(本地库初始化): 第一步:首先在D盘建了个名为git空文件夹,命令行中cd到这个文件夹: 第二步:通过git init命令把这个目录变成Git可以管理的仓库: 文件夹会生成一个.git目录,不用去改它,这个目录默认是隐藏的,用ls -lah命令就可以看见 注意:.git 目录中存放的是本地库相关的子目录和文件,不要删除,也不要进行修改: 参考:https://blog.csdn.net/songkuiyuansky/article/d

GIT → 05:Git命令行操作

5.1 打开命令行窗口 安装Git后,在资源管理器的空白处,单击鼠标右键打开窗口,点击 Git Bash Here ,打开Git命令行窗口,在窗口中可直接使用Linux命令操作: 5.2 初始化Git本地库 命令: git init效果: 注意: .git 目录中存放的是本地库相关核心配置文件,也不要随意删除与修改 .git 目录仓库目录说明: hooks目录:脚本文件的目录. info目录:保存了不希望在 .gitignore 文件中管理的忽略模式的全局可执行文件 logs目录:日志目录 ob

git命令行操作

从本地上传代码到仓库(假设已经建好仓库): 1.初始化: git init 2.将所有文件加入缓存区: git add * 3.提交当前工作空间的修改内容: git commit -m 'commit info' 4.将仓库连接到远程服务器(server仓库地址): git remote add origin <server> 5.改动内容推送到远程master(如果报rejected错误,要先pull一下再push): git push -u origin master (在第一次推送mas

(02)Git命令行操作

一.本地库操作与设置签名 1.本地库初始化 上一篇介绍了安装Git客户端工具,安装完后在系统的任何地方右键都会看到Git GUI Here 和 Git Bash Here 两个菜单,点击 Git GUI Here 就会进入到Git的命令行界面,在该界面中可以完全使用Linux命令,如图: 本地初始化命令是:git init,执行该命令,会在所在目录创建一个.git的隐藏文件夹. 注意:.git 目录中存放的是本地库相关的子目录和文件,不要删除,也不要胡乱修改. 2.设置签名,区分不同开发人员的身

Git 三、Git 命令行操作

1.本地库初始化 在本地新建git仓库D:\git\gitRep,右键-->git bush here (1)命令:git init (2)效果: (3)注意:.git 目录中存放的是本地库相关的子目录和文件, 不要删除, 也不要胡乱修改. 2.设置签名 (1)作用: 区分不同开发人员的身份 (这里设置的签名和登录远程库(代码托管中心)的账号. 密码没有任何关系)(2)命令 [1]项目级别/仓库级别: 仅在当前本地库范围内有效 git config user.name [name] git co

Git 命令行操作介绍

git 客户端 功能 命令 可选参数  说明 SSH ssh-keygen   生成密钥(注意要在~/.ssh文件夹执行,或生成后移动到.ssh) 仓库 git clone  -b | --branch 克隆指定分支 --depth <depth> 创建一个浅克隆,克隆指定历史提交记录 --shallow-since=<date> 创建一个浅克隆,克隆指定日期的历史提交记录 git init   初始化仓库 分支管理 git commit   提交更改到仓库 git merge  

命令行操作svn和git和git

前几天在写代码的时候电脑突然坏掉,老大交代的任务没完成,非常痛恨自己用svn或者git保存代码,相信很多程序员遇到过,硬盘坏掉,存在硬盘中的代码丢失,无法找回的问题,svn和git可谓程序员界的福音,那么问题来了,什么是svn和git呢? svn和git其实都是一种用来管理项目的控制版本工具,他们有很多好处,比如 1.防止代码丢失----可以把自己的代码上传到服务器上 2.适合多人开发----合并代码超级简单 3.能够进行版本回退 4.能解决冲突和bug 5.可以做分支 6.责任到人----可以

git命令行使用

1. git命令行配置 1)安装完git客户端之后,在任意目录右键鼠标,选择Git GUI Here 2)在打开的窗口中依次选择Help->> Show SSH Key 2)如果弹出的窗口中中间部分没有key,可以点击 Generate Key 按钮,生成key,然后将生成的key拷贝一下,添加到gitlab中即可. 2. 命令使用 1)下载代码 在存放代码的目录中,右键鼠标,选择 Git Bash Here,然后会打开终端窗口 输入: git init   创建git配置目录 输入下面命令,

github linux 命令行操作实例

继续整理一下linux 下面使用命令行操作实例 首先创建文件目录 然后 执行 git clone 操作 [email protected]:~/桌面$ cd test/ [email protected]:~/桌面/test$ git clone https://github.com/timelessz/TESTDEMO.git正克隆到 'TESTDEMO'...remote: Counting objects: 3, done.remote: Total 3 (delta 0), reused