git尝试使用

本文提供了详细的Git使用教程,包括安装步骤、基本操作命令如初始化仓库、添加文件、提交更改等,并介绍了如何配置用户信息及进行远程仓库操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

再不用git就tmout了
参考手册http://www.linuxgem.org/user_files/linuxgem/Image/git-tutor.pdf
安装
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz 
tar xzvf git-latest.tar.gz
cd git-{date}
autoconf
./configure --with-curl=/usr/local
make
make instal

进如随便一个目录
git init
在当前目录就生成了 .git目录
echo "haha" >text.txt
git add .
git commit
随便写点log,不要写在注释里

git log
git log --stat --summary
比如下载nginx的源码
mkdir ngx_openresty
git clone https://github.com/agentzh/ngx_openresty ngx_openresty/


-------------
随便写点代码到一个目录
cd $work
git init
生成.git目录,tree查看对比

git add .
把当前目录的文件上传到上面
git commit -m "我的提交的注释"
会出现改变用户名和email的提示
git config --global user.name "frenchleaf"
git config --global user.email frenchleaf@gmail.com
git commit --amend --reset-author
------------------------------------------------------------------

20121126

https://help.github.com/articles/fork-a-repo

先在网页上点fork

https://github.com/killinux/nginx_http_push_module

得到
git clone https://github.com/killinux/nginx_http_push_module

cd nginx_http_push_module


590 git remote add haoningtest https://github.com/killinux/nginx_http_push_module
591 git fetch haoningtest
592 ls
593 git commit -a
594 git push haoningtest master
595 git fetch haoningtest
596 git merge haoningtest/master


git安装参考http://blog.youkuaiyun.com/wegatron/article/details/7990549
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum install --enablerepo=webtatic git-all
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值