- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我有一个公共(public)存储库。没有其他人对它进行 fork 、 pull 或做任何其他事情。我对一个文件做了一些小改动,成功提交,并尝试推送。它说“一切都是最新的”。没有分支机构。我对 git 非常非常陌生,我不明白到底发生了什么。
git remote show origin
告诉我:
HEAD branch: master
Remote branch:
master tracked
Local ref configured for 'git push':
master pushes to master (up to date)
有什么想法可以让我明白它不是最新的吗?
谢谢
更新:混帐状态
:
# On branch master# Untracked files:# (use "git add ..." to include in what will be committed)## histmarkup.el# vendor/yasnippet-0.6.1c/snippets/no changes added to commit (use "git add" and/or "git commit -a")
git branch -a
:
* master remotes/origin/master
git fsck
:
dangling tree 105cb101ca1a4d2cbe1b5c73eb4a238e22cb4998dangling tree 85bd0461f0fcb1618d46c8a80d3a4a7932de34bb
更新 2:我重新打开修改后的文件,我知道我所做的修改消失了。所以我再次添加了它们,完成了 git status
、git add filename
、git commit -m "(message)"
的繁琐操作,以及git push origin master
,突然间它按照预期的方式工作。
更新 3:git reflog
输出:
009251 HEAD@{0}: commit: added copy/paste keybindings06920f9 HEAD@{1}: commit: Minor .gitignore tweak84aa30c HEAD@{2}: checkout: moving from master to master84aa30c HEAD@{3}: checkout: moving from ec16cca979045547a5444e20f48ed468dee81dd4 to masterec16cca HEAD@{4}: commit: Added keybindings for copy/paste5c4a611 HEAD@{5}: commit: remember-mode keybinding to M-Rf3e4729 HEAD@{6}: commit: Correcting last push which wiped out some stufffa28a3e HEAD@{7}: checkout: moving from master to fa28a3ed80eb0c6d4375ae77060d5cb4143d6a8e^084aa30c HEAD@{8}: commit: Modified keybindings, added LaTeX hook10e7718 HEAD@{9}: commit: Added a few keybindingsd62378b HEAD@{10}: commit (initial): first commit
最佳答案
尝试
git config push.default tracking
http://git-scm.com/docs/git-config :
推送默认值
定义 git push 在命令行上没有给出 refspec 时应该采取的操作,远程中没有配置 refspec,并且命令行上给出的任何选项都没有暗示 refspec。可能的值是:
* nothing - do not push anything.
* matching - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default.
* upstream - push the current branch to its upstream branch.
* tracking - deprecated synonym for upstream.
* current - push the current branch to a branch of the same name.
关于git push 说一切都是最新的,但肯定不是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4837290/
您好,我有一个表,其中包含组织每个成员的状态记录。我想根据表中提供的最新状态找出哪些成员仍然活跃。Hee 是表中记录的示例: 最佳答案 您可以使用 where 子句中的子查询获取每个名称的最后状态:
对 BDD 和 RSpec 相当陌生,我真的很好奇人们在编写 RSpec 测试/示例时通常会做什么,特别是因为它涉及同一事物的正面和负面测试。 以验证用户名和有效用户名仅包含字母数字字符的规则为例。
我是一名优秀的程序员,十分优秀!