我在Git本地提交了三个提交,但没有推送到GitHub.我想查看所有三个提交的更改/差异,如何查看所有差异?
我试过了: git log --branches --not --remotes
这向我展示了三个提交,但并非所有的差异/变化.
commit c08fbb72ae6a06e8b2ff3dbbb96fb555a43f4136
Author: Justin <justin@mydomain.com>
Date: Mon Sep 10 18:17:02 2012 -0700
Updated order of requires in Requires.php
commit 041fe19a48269a8aea2ccf90f53568893d4e0158
Author: Justin <justin@mydomain.com>
Date: Mon Sep 10 17:56:42 2012 -0700
Checking for app.config.php in Requires.php
commit 61c103a8a122bcde2311d081a8340ee1dd71997c
Author: Justin <justin@mydomain.com>
Date: Mon Sep 10 17:42:20 2012 -0700
Version bump 0.4.0. See CHANGELOG.md
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助.
我在 github 中做了错误的提交,我想做以下事情:
是否有可能做到这一点?
我被建议在运行git pull和合并之前提交所有更改.是否有意义 ?如果我跑什么pull和merge 之前提交我的变化,并提交它们后合并?
我不明白发生了什么.我做到了
git add .
git commit
Run Code Online (Sandbox Code Playgroud)
然后我突然看到一堆提交的desktop.ini文件列表.
(我不明白为什么以前的提交没有得到任何一个,并且可能突然改变了,但那是暂时的)
所以,我解除了提交
git reset --soft HEAD~1
Run Code Online (Sandbox Code Playgroud)
在.gitignore上添加了一行:
./**/desktop.ini
Run Code Online (Sandbox Code Playgroud)
做了另一个
git add .
git commit -m "test"
Run Code Online (Sandbox Code Playgroud)
还在添加一堆desktop.ini.我究竟做错了什么?
当我提交时,这个文字跳了起来:
Please enter the commit message for your changes. Lines starting
with '#' will be ignored, and an empty message aborts the commit.
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
Changes to be committed:
new file: modules/new_file.txt
Run Code Online (Sandbox Code Playgroud)
我想要的是让这个信息文本也显示了我最后的消息提交,没有我需要去通过git log,git show或任何类似.
例如
(...)
Changes to be committed:
new file: modules/new_file.txt
Previous commit message:
[FIX] Fixed the foo.bar module
Run Code Online (Sandbox Code Playgroud)
这与这个问题完全相同,但没有一个答案实际上回答了这个问题,所以我想OP只是问它有点不对劲?
我对不同目录中的两个文件进行了更改,如何为单个提交添加两个文件。我可以做什么,添加第一个文件,然后将目录更改为第二个文件,然后添加第二个文件,最后执行提交。这行得通吗?
我在Ubuntu GNOME上使用Android Studio 2.0 Beta 6.我面临一个奇怪的问题.我在我的Android项目中使用git版本控件.构建项目后,当我点击通过Android Studio GUI提交更改时."提交更改"对话框将每个文件显示为已更改.当我点击任何文件时,它说内容是相同的.我附上下面的截图,点击任何文件说内容是相同的.
所以我的问题是,为什么Android Studio会在提交更改对话框中显示具有相同更改的文件,我该如何解决?我试过谷歌,但没有找到任何相关的问题.
我如何派生一个较旧版本的github项目?我想分叉一个项目的特定提交,这个的提交3b5915a21a997f88fa16a6feb5b893953a06b0b5
项目:https : //github.com/aseprite/aseprite,最近的提交中断了主线。我真的很想叉版本1.1.8。
所以我在我的 github 上存储了我在一段时间内在 json 文件上得到的所有差异(我调用一个 api,每次 json 更新并只存储差异)。给你一个想法;这是可用性的变化,一个id是否可用。我现在要做的是:我想在本地机器的 json 文件中获取每个提交的内容。所以稍后我可以使用 nodejs 或 python 按顺序循环遍历所有 json 文件,然后使用我感兴趣的数据生成一个 CSV。
感谢您的帮助,
我开始学习Git了.我一直在搞乱GitKraken,我希望使用GUI是保存和分享内容的可行途径.我更喜欢GUI到命令行.
现在我明白了,在GUI中,我需要stage的文件,然后commit他们,然后push,上传他们.但为什么push和commit两个不同的东西?为什么只想commit本地,没有以下上传来保持文件同步?
git-commit ×10
git ×9
github ×2
android ×1
git-checkout ×1
git-commands ×1
git-fork ×1
git-log ×1
git-merge ×1
git-push ×1
json ×1