第一次用git
来源:互联网 发布:空间网络音乐怎么删除 编辑:程序博客网 时间:2024/05/17 01:30
1.首先我是克隆项目 git clone
这是就会弹出Git命令行,并且自动切换到当前所在目录,我们运行
git init git add "某文件" //把该目录下的所有文件全部提交到缓冲区
git add . //把所有文件都提交到缓存空间git commit -m "GitHelloWorld first commit" //说明
将代码提交到HEAD,注意此时还没有提交到服务器,下面将提交
git remote add origin https://git.oschina.net/xxx/xxx.git//具体看项目 git push origin master//可能出现Non-fast-forward问题
查看提交的代码修改 git log --stat
git show
今天add origin遇到一个问题,untracked files,
解决办法就是把没有跟踪到的文件add进去 ,例如:输入命令 git add index.html
git提交的时候git commit -m "" 记得引号不要写成中文的引号
pull的时候遇到问题
I am using git via the terminal on the mac. I have encountered an annoying problem recently when I try to perform git pull
. After performing git pull
I receive the following error message:
Merge ssh://domain.com/repository.git# Please enter a commit message to explain why this merge is necessary,# especially if it merges an updated upstream into a topic branch.## Lines starting with '#' will be ignored, and an empty message aborts:# the commit.
The issue is that I can't enter anything. My terminal seems stuck and there isn't anything I seem to be able to do about it. I am reasonably new to git so it may be a simple mistake I am making.
I read here that for some people the text editor opens at this point. This certainly isn't the case at my end. It also states there that I can use the --no-edit flag to merge without a message, but even this does not seem to work at my end.
I am a bit clueless at the moment, stuck and unable to push any changes to my server ;-)
Thank you very much for any help provided!
To solve this:
- press "i"
- write your merge message
- press "esc"
- write ":wq"
- then press enter
- 第一次用git
- 第一次使用git
- 第一次使用git配置
- GIT 第一次 clone 异常
- git的第一次使用
- git第一次碰到冲突
- 第一次使用git
- 第一次使用Git bush
- git第一次推送
- 第一次用eclipse从git上下载和导入项目
- 用git第一次克隆git.oschina上的代码所遇到的问题
- 第一次搭建自己的GIT
- 第一次实际地使用git
- git学习笔记-----第一次提交
- git的第一次使用教程
- git与github,第一次接触
- git:初学者使用git第一次提交代码
- 第一次用
- 国产J2EE轻量级AJAX框架 Buffalo(布法罗)
- python常用的两个图像处理函数
- Atom的使用技巧
- Linux下安装mysql 出现依赖包冲突解决方法
- NLog类库小结
- 第一次用git
- leetcode 324. Wiggle Sort II
- HDU-2017 ACM/ICPC Asia Regional Qingdao Online-1001-Apple
- eclipse中java代码的审查和格式校验插件
- 自己实现一个SQL解析引擎 功能:将用户输入的SQL语句序列转换为一个可执行的操作序列,并返回查询的结果集。 SQL的解析引擎包括查询编译与查询优化和查询的运行,主要包括3个步骤: 查询分析
- 迷茫中 我走上hadoop之路
- 【9月18日】面向学术文献的知识挖掘方法研究
- leetcode
- MapReduce架构