[置顶] startos 上 git 使用

oschina git如何提交文件

git add file 把改动加到缓存
git rm  file 从缓存移除
git commit 提交文件到本地库 加-m “提交信息”
git push 将本地库更新到上级库

git add .,git commit -m ''.git push
git 提交修改到github
1. 在github 上注册帐号,建立仓库 2. 克隆到本地 3. 分支创建与合并 git branch local git checkout local 切换到local 4. 在local分支进行开发,完成后与master分支合并 git checkout master git merge local git branch -d local 合并完成后删除local 5.添加新文件到版本库 git add file1.txt 添加单个文件 git add *.txt 添加所有txt文件 git add . 添加所有文件,包括子目录,但不包括空目录 6.提交
git commit -m 'msg' -a 提交所有修改
git commit -m 'msg' file1.txt 提交单个文件
git commit -C head -a -amend 增补提交,不会产生新的提交历史记录 
此时并不会上传到github
7. git push (origin master)提交最新修改


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值