使用git提交代码简单说明
一. 图形化git
git add . #将任何新的或修改的文件添加到索引
git commit -m '注释信息 ' #提交 git push origin master
git rm -r --cached test
git commit -m "Remove the ignored directory test"
git push -u origin master
五. 如果想把代码提交到和之前不同的仓库中
例如有远端仓库pshyms/django,它的克隆地址https://github.com/xxx/django.git。需求是把本地dailyfresh文件夹上传到xxx/django远端仓库中
1. 在本地仓库位置比如/root/mygithub中执行git clone https://github.com/xxx/django.git
2. 把dailyfresh文件夹放到克隆下来的django文件夹下
3. 在django文件夹下执行git add . git commit -m ' .." git push origin master
git mv -f oldfolder newfolder
git add -u newfolder (-u选项会更新已经追踪的文件和文件夹)
git commit -m "changed the foldername whaddup"
git push origin master 七. 删除文件夹
git rm -r folder
git commit -m "delete"
git push origin master 八. 新建/删除分支
git branch new_branch #新建一个分支
git checkout new_branch #切换到新的分支名
git branch #查看一下分支情况
git push -u origin new_branch #将新分支同步到github线上
然后就是git add . git push 老路子了 如果想删除new_branch分支,首先切换到不是要删除的分支,比如git checkout master, 然后git branch -d new_branch 即可 九. pycharm上传项目到github 链接:https://blog.csdn.net/m0_37306360/article/details/79322947需要先配置好git的相关参数,比如ssh密钥和全局环境变量
使用git提交代码简单说明的更多相关文章
- Git使用、Git配置、Git提交代码、Git上传
非教程,只是自己的一个简单笔记.建议没有入门的朋友,直接看git的官方help文档: https://help.github.com/articles/set-up-git 1.注册一个git账号,超 ...
- Git提交代码到主分区
git 提交代码,本地新建一个my分支,不从本地master分支直接上传,而是先从本地my分支上提交至本地master分支,然后本地master提交至远程master分支 上.前提是远程只有一个mas ...
- git提交代码到github
前言:转载请注明出处:http://blog.csdn.net/hejjunlin/article/details/52117504 git提交代码到github 命令汇总: git init git ...
- 使用git提交代码到github,每次都要输入用户名和密码的解决方法
自从使用git提交代码到github后,发现自己使用git的功力增长了不少,但也遇到不少问题.比如,使用git提交代码到github的时候,经常要求输入用户名和密码,类似这种: 网上有这么一种解决方法 ...
- Git提交代码失败: empty ident name (for <>) not allowed
使用git提交代码,报错如下: 下午2:56 Commit failed with error 0 files committed, 1 file failed to commit: 升级 empty ...
- 在使用Git提交代码的时候犯了个低级错误
今天在使用git提交代码的时候,犯了个很低级的错误,按照一切流程当我add并commit提交代码,最后使用push到远程仓库, 接下来奇怪的事情发生了,push之后,查看远程仓库代码并没有发现提交记录 ...
- Git提交代码报错Git push error:src refspec XXX matches more than one解决方案
Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...
- git提交代码到码云
日常代码一般提交到github比较多,但我还是钟爱马爸爸,没错就是码云. 码云是中文版的代码托管的网站,不存在打开网速问题,使用也蛮方便的,日常自己保存托管代码已经足够,平时使用git提交代码到码云是 ...
- git提交代码报错 trailing whitespace的解决方法
1. git提交代码报错 trailing whitespace 禁止执行pre-commit脚本 进入到项目目录中 chmod a-x .git/hooks/pre-commit 2.git提交代码 ...
随机推荐
- 【祥哥带你玩HoloLens开发】了解如何实现远程主机为HoloLens实时渲染
今天有一个兄弟在群里讲到他们的项目模型比较大,单用HoloLens运行设备的性能无法满足需要,问道如何将渲染工作交给服务器来做,讲渲染结果传给HoloLens.正好刚刚看官方github的时候发现一个 ...
- 一款比较好用的JS时间控件-laydate
官方讲解:http://laydate.layui.com/ 具体的内容请看官方讲解,此处仅说名应用: 1.在jsp或html或其他中引入laydate.js <script src=&qu ...
- 100. Same Tree同样的树
[抄题]: Given two binary trees, write a function to check if they are the same or not. Two binary tree ...
- zookeeper和duboo 没用
什么是dubbo Dubbo是阿里巴巴SOA服务化治理方案的核心框架,是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案. 测试和生产公用一套zookeep ...
- Java中的并发工具类:CountDownLatch、CyclicBarrier和Semaphore
在java 1.5中,提供了一些非常有用的辅助类来帮助我们进行并发编程,比如CountDownLatch,CyclicBarrier和Semaphore,今天我们就来学习一下这三个辅助类的用法. 一. ...
- Photo4
Story: 我手捧玫瑰,一个人,走在桥上.桥下是波澜壮阔的大海,一不小心,我就有失足的危险.海鸟的低鸣在我耳际盘旋着,浪汹涌,仿佛要把我吞噬掉.你也许奇怪,为何我一人手捧玫瑰走在桥上.只因,女骑从来 ...
- Django学习笔记:为Model添加Action
|- Django版本:1.8 |- Python版本:3.4 models.py 1 class Story(models.Model): #编辑Story状态 STATUS_CHOICES = ( ...
- How attach Java source(为eclipseIDE附加资源)
In Eclipse, when you press Ctrl button and click on any Class names, the IDE will take you to the s ...
- Introduction MBG
文档地址 http://www.mybatis.org/generator/configreference/xmlconfig.html 源码地址 https://github.com/mybatis ...
- SocketAsyncEventArgs
SocketAsyncEventArgs是.net提供的关于异步socket类,封装了IOCP的使用,可以用它方便的实现NIO(non-blocking IO) NIO对于提升某些场景下Server性 ...