git配置
git config
git config –global user.name “John Doe”
git config –global user.email johndoe@example.com
git config –global core.editor emacs
git config –list
git config user.name
从远程仓库拿数据下来
git clone git://github.com/schacon/grit.git mygrit
远程仓库其他
- 查看远程仓库
git remote -v - 查看远程仓库信息
git remote show [remote-name] - 远程仓库的重命名
git remote rename A B - 添加远程仓库
- git remote add [shortname] [url]
- 移除远端仓库
git remote rm - 从远程仓库抓取数据
git fetch [remote-name] - 推送到远程仓库
- git push [remote-name] [branch-name]
简单的git操作:无脑版
- 首先先把自己的git参数配置配置好
- 再远程clone一个项目下来
本地对文件操作
- 文件修改,这与git无关
- 文件添加到暂存区,git add filename
- 文件提交git commit -a -m description
- 把修改完的项目再提交到远程仓库中