相关疑难解决方法(0)

如何将更改的文件添加到Git中的旧(不是最后)提交

我在过去一小时内改变了一些事情,并一步一步地提交了它们,但我刚刚意识到我忘了在一些提交之前添加一个已更改的文件.

日志看起来像这样:

GIT TidyUpRequests u:1 d:0> git log 
commit fc6734b6351f6c36a587dba6dbd9d5efa30c09ce 
Author: David Klein <> 
Date:   Tue Apr 27 09:43:55 2010 +0200

    The Main program now tests both Webservices at once

commit 8a2c6014c2b035e37aebd310a6393a1ecb39f463 
Author: David Klein <>
Date:   Tue Apr 27 09:43:27 2010 +0200

    ISBNDBQueryHandler now uses the XPath functions from XPath.fs too

commit 06a504e277fd98d97eed4dad22dfa5933d81451f 
Author: David Klein <> 
Date:   Tue Apr 27 09:30:34 2010 +0200

    AmazonQueryHandler now uses the XPath Helper functions defined in XPath.fs

commit a0865e28be35a3011d0b6091819ec32922dd2dd8 <--- changed file …
Run Code Online (Sandbox Code Playgroud)

git

405
推荐指数
4
解决办法
8万
查看次数

不能用rebase拉

我收到这条消息:

Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
Run Code Online (Sandbox Code Playgroud)

是的,我有未提交的更改.我搜索了一种在新代码之上修改我未提交的更改的方法.

我发现了这个:https://github.com/aanand/git-up

我想知道这是否仍然是可行的方法,或者是否还有更多现代化的方法.

我使用git版本1.8.1

git git-rebase

9
推荐指数
3
解决办法
1万
查看次数

如何编辑以前的git提交?

我刚刚意识到我遗漏了一个文件,我本来应该添加到5提交的提交中.在提交消息中,我说该文件已包含在内,我不想做一个新的提交文本"哎呀忘了在提交#XXXXX中添加此文件"

编辑先前提交的最佳方法是什么,以便我可以添加文件?

git

3
推荐指数
2
解决办法
1516
查看次数

标签 统计

git ×3

git-rebase ×1