您的位置:首页 > 理论基础 > 计算机网络

Git 安装和配置(网络代理的设置)

2016-05-20 16:54 627 查看
http://www.linuxidc.com/Linux/2015-04/116215.htm

安装 git

sudo apt-get install git

查看git配置

git config --list

或者~/gedit .gitconfig

git设置代理(一般用于公司内部网络,如果上网正常,不需要设置)

git config --global http.proxy ip:port

git用户名

git config --global user.name "FIRST_NAME LAST_NAME"

配置email

git config --global user.email "MY_NAME@example.com"

建立Bitbucket用户和仓库
https://confluence.atlassian.com/display/BITBUCKET/Create+a+Bitbucket+account+and+a+Git+repository
初始

mkdir /path/to/your/project

cd /path/to/your/project

git init

git remote add origin https://XXX@bitbucket.org/YYYY/ZZZZ.git
git add .

git commit -m "modify"

git push -u origin master

修改后

修改文件(git已经建立)

git add .

git commit -m "注释"

git push -u origin master

检出

git pull

克隆

git clone https://XXX@bitbucket.org/YYYY/ZZZZ.git
GitHub 教程系列文章: 

GitHub 使用教程图文详解  http://www.linuxidc.com/Linux/2014-09/106230.htm 

Git 标签管理详解 http://www.linuxidc.com/Linux/2014-09/106231.htm 

Git 分支管理详解 http://www.linuxidc.com/Linux/2014-09/106232.htm 

Git 远程仓库详解 http://www.linuxidc.com/Linux/2014-09/106233.htm 

Git 本地仓库(Repository)详解 http://www.linuxidc.com/Linux/2014-09/106234.htm 

Git 服务器搭建与客户端安装  http://www.linuxidc.com/Linux/2014-05/101830.htm 

Git 概述 http://www.linuxidc.com/Linux/2014-05/101829.htm 

分享实用的GitHub 使用教程 http://www.linuxidc.com/Linux/2014-04/100556.htm 

Git 的详细介绍请点这里
Git 的下载地址请点这里
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git