现象: jb@H39:~/doc$ git statusOn branch masterYour branch is up-to-date with 'origin/master'. Untracked files: (use "git add <file>..." to include in what will be committed) ".#38\344\270\212\347\232\204\350\231\232\346\213\237\346
git reset --hard origin/master git status FAQ: When I issue the "git status" command, I see the following "Your branch is ahead or origin/master ..." git message: # On branch master # Your branch is ahead of 'origin/master' by 5 commit
git status命令可以列出当前目录所有还没有被git管理的文件和被git管理且被修改但还未提交(git commit)的文件.. 比如; git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: 2.txt # # Changes not staged for commit:
本篇博客是整理git相关知识的第一篇,因为之前一直是用SourceTree对Git的命令行操作用的不是特别熟,于是乎过了一遍ProGit(链接:https://git-scm.com/book/zh/v1).本篇博客以及后边的将要发的几篇博客是对之前看ProGit时的笔记的整理.当然在整理时,根据具体示例来梳理了一下知识点,和ProGit上的讲解顺序有些区别.本篇博客聊了Git基础操作的一部分,主要是基于Github上Fork的Masonry仓库来做的,首先Clone相关仓库,然后根据git s
查看当前文件状态 使用git status查看文件状态,如果是空仓库,执行结果如下 $ git status On branch master No commits yet nothing to commit (create/copy files and use "git add" to track) 如果我们加入一个新文件main.c $ git status On branch master No commits yet Untracked files: (use "gi