【mac下.gitconfig配置别名alias】教程文章相关的互联网学习教程文章

mac下.gitconfig配置别名alias【代码】

在多人协作开发时,一般用git来进行代码管理。git有一些命令如:git pull 、 git push等等,这些命令可以设置alias,也就是缩写。如:git pull 是 git pl, git push 是 git ps。可以根据个人习惯进行修改。修改别名alias步骤如下:1,进入根目录$ cd 2,查看根目录下面的文件$ ls -la 查看一下有没有.gitconfig文件。3,编辑.gitconfig$ vi .gitconfig 添加如下:[alias] co = checkout ci = commit st = status pl = pull ps = pus...

新目录下使用git管理,未配置.git目录,报错fatal: Not a git repository (or any of the parent directories): .git

fatal: Not a git repository (or any of the parent directories): .git第一次用Git,遇到这个错误提示,原来是这样的:fatal: Not a git repository (or any of the parent directories): .gitThis tells you that the directory you‘re in is not a git repository. Before you can add remote servers, commit things and so you must have a git repository created.In a git repository there‘s a directory (which can be...

git的配置文件

cat ~/.gitconfig #git 的配置git help xx #查看帮助文档[alias]st = status --short --branch# 增加commitci = commit -a -v -s # 合并改过的内容cm = commit -a --amend -C HEAD#在commit的基础上修改commitca = commit --amend# switch to branchco = checkout -b#only create a new brachbr= branchbv = branch -vvba = branch -ra#delete the branchdb = branch -ddf = diffdc = diff --cachedlg = log -p #...

git配置使用【代码】【图】

本地文件 >>>>>> 缓存区 >>>>>> 仓库 一 本地仓库1.配置用户名和邮箱git config --global user.name "Taysem" git config --global user.email "1580011497@qq.com" 2.初始化一个仓库1.创建文件夹 test 2. 进入到文件夹testcd test然后在git init 3.向仓库添加文件1.创建文件 touch test.py 2.查看状态, git status 3.提交文件: git add test.py 到缓存区 4.将文件从缓存区提交到仓库: git commit -m ‘test.py‘ 4.修...

gitlab的安装和配置

1 使用omnibus gitlab来安装gitlab也就是说,将gitlab和它所需要的组件打一个包,即打一个bundle进行安装。第一步,安装gitlab的源。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash将源改成镜像的源。apt-get update第二步,安装sudo apt-get install gitlab-ce2 omnibus gitlab-ce bundle的组件包括:nginx、redis和postgres3 gitlab的各个配置选项4 nginx的用途以及各个配置...

配置github【图】

1,下载git2,打开git bash here 3,3.1:设置用户名git config --global user.name ‘zhangsan‘3.2:设置用户名邮箱git config --global user.email ‘zhangsan@sdjgroup.com.cn‘3.3:查看设置git config --list 4,继续输入命令:ssh-keygen -t rsa -C "huxing@sdjgroup.com.cn" 5,配置github 继续: 继续: 继续:配置SSH 把id_rsa.pub中的内容复制出来,填写到如下中: 完成 然后就可以正常的上传代码到github中了。 原文:...

多机器-多账号-配置git【代码】

场景:github,开发平台gitwork,公司自己的git平台在个人电脑和工作电脑上配置gitwork,为了参与开源项目,在自己的机器上安装github。机器:pc_forwork, pc_forperson1. 首先在2台机器上联通公司git(场景:同一个账户在在两台机器上链接同一平台)pc_forwork:  安装git:http://www.cnblogs.com/ccdev/archive/2012/09/12/2682098.html  生成密钥:ssh-keygen -t rsa -C “工作邮箱”  将密钥配置到git的账户中pc_forper...

git bash的安装与配置【图】

作业要求来自于:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE2/homework/2097 1.下载安装配置用户名和邮箱。(1)下载安装Github配置(2)配置用户名命令:$git config --global user.name "题目产"(3)配置邮箱命令:$git config --global user.email "873303519@qq.com"(4)查看用户名命令:$git config --global user.name(5)查看邮箱命令:$git config --global user.email             图1 配置查看用户...

Xcode 中 Git 的配置与使用【代码】【图】

Xcode 中 Git 的配置与使用主要围绕下面几个问题展开阐述:问题1,如何在Xcode中创建本地代码库,并添加和提交代码到本地代码库?问题2,如何在Xcode中提交推送给远程服务器代码库?问题3,如何在Xcode中克隆远程服务器代码库到本地?问题4,如何使用Xcode获取远程代码库数据,并解决冲突问题? 一、如何在Xcode中创建本地代码库,并添加和提交代码到本地代码库?创建代码库有两种方式:方式1:新建工程的时候创建1. 勾选Create Gi...

Android源码浅析(二)——Ubuntu Root,Git,VMware Tools,安装输入法,主题美化,Dock,安装JDK和配置环境【代码】【图】

Android源码浅析(二)——Ubuntu Root,Git,VMware Tools,安装输入法,主题美化,Dock,安装JDK和配置环境接着上篇,上片主要是介绍了一些安装工具的小知识点Android源码浅析(一)——VMware Workstation Pro和Ubuntu Kylin 16.04 LTS安装配置,其实Ubuntu Kylin 16.04 LTS也只是为了体验,我们为了追求稳定,还是使用了Ubuntu14.04这里提供一个国内镜像的下载链接,可以用迅雷,下载下来之后后缀改成iso即可下载链接:http://ft...

git配置http代理【代码】

git配置http代理经常遇到克隆 github 慢的问题,这里记录一下几种配置 git 代理的方法,解决 clone github 过慢。目录git配置代理git单独配置github代理git配置全局代理配置终端环境变量git配置代理主要使用 git config 命令git单独配置github代理1.https 访问仅为 github 设置 http 或 socks5 代理# 设置 http 代理 git config --global http.https://github.com.proxy http://127.0.0.1:1080# 设置 socks5 代理 git config --glo...

最新 IntelliJ IDEA 配置 Git / GitHub 过程演示(2021超详细图文版)【图】

IDEA版本本文使用的IDEA版本为IntelliJ IDEA 2021.1.2 IDEA集成Git1.首先下载安装git客户端2.打开IDEA设置页面,配置IDEA中在本地安装的 git.exe的位置,点击test后能够显示git的版本号,配置成功 IDEA登陆Github(第一种:password方式)1.首先需要有一个github账户,没有的话先注册一个2.打开设置选项卡,在版本控制里面找到github,选择password登陆;注意:不要关闭小弹框,直接去浏览器授权即可 2.1.此时会跳转到网页登陆gith...

git 在一台机器上配置多个账户

前提: 必须知道怎样配置git账户,请參考git官方教程:https://help.github.com/articles/generating-ssh-keys 这个教程能教你怎样生成ssh-key,以及怎样加入ssh-key。 补充一点。怎样设置user.name和user.email。命令例如以下: 1)设置局部的user.name和user.email git config user.name “xxxxxx” git config user.email “xxx@xxx.com” 2) 设置全局的user.name和user.email git config --gloable user.name “xxxxxx” git c...

Android Studio升级到最新v1.3版后配置GitHub提示Gradle版本不支持的问题【图】

基于ADT(基于Eclipse)开发Android的IDE已经被谷歌官方放弃, 首页推荐使用Android Studio. 于是使用AS的人也开始多起来了. 从0.8到现在, AS更新很频繁, 最近更新了1.3版本后, 计划将部分项目连接到Github上面管理. 在setting配置地址和登录信息, 测试连接时成功了. 然后检出Git项目到本地时却提示 the project is using an unsupported version of gradle. please point to a supportedGradle version in the project‘s Gradle......

git ssh 配置过程【图】

#每次都要重新配置,刚好又重新配置,就记录一下。以后看这里就行 1. 在git的安装目录下,用bash.exe打开命令: ssh-keygen -t rsa -C 123456@qq.com 2. 在github上粘贴生成的public秘钥 打开id_rsa.pub文件将里面的内容粘贴到github的setting 3.测试连接 --第一次会让回答问题,输入yes,yes就行。命令:ssh -T git@github.com 说明配置成功 4. 将工作空间git 初始化 5. 配置remote url使用ssh重新配置remote url (使用ssh...