我想将一个git存储中的某些更改应用于一个提交,并将其余更改应用到另一个提交。我怎样才能只应用一些git存储?
13
A
回答
9
Unstash藏匿...
git stash pop
...使用补丁模式git add
...
git add -p
...然后提交这个......
git commit -m "Partial stashed commit"
+2
您也可以重新保留未分配的更改,但保留索引。 – R0MANARMY 2013-03-04 23:18:13
+1
打开终端并键入git checkout stash @ {0} -
13
git checkout [email protected]{0} -- <filename>
为每个提交和所有文件n执行两次这将涉及每个。你可能能够做到这一点的列表或一个文件名的glob。
3
仅对您想要更改的文件应用此修补程序。
git show [email protected]{0} -- <file(s) in question> | git apply
相关问题
- 1. 我怎样才能存储点击QPushbuttons
- 2. 我怎样才能只选择一些JSON对象?
- 3. win32 api C++:我怎样才能只着色一些文字?
- 4. 我怎样才能从一个存储过程调用Database.ExecuteSqlCommand
- 5. 我怎样才能
- 6. 我怎样才能用jQuery
- 7. 我怎样才能使命令行记住或引用存储
- 8. 我怎样才能调用ViewDidAppear只有一次?
- 9. 我怎样才能让我的领域只设置一次?
- 10. 我怎样才能使svg响应
- 11. 我怎样才能从git clone到git clone?
- 12. 我怎样才能在Magento
- 13. 我怎样才能笨
- 14. 我怎样才能在C++
- 15. 我怎样才能在Python
- 16. 我怎样才能从DataGridView
- 17. 我怎样才能在Castle.Windsor
- 18. 我怎样才能得到
- 19. 我怎样才能在MySQL
- 20. 我怎样才能使PHP
- 21. 我怎样才能在Zebble
- 22. 我怎样才能在vb.net
- 23. 我怎样才能在Doctrine2
- 24. 我怎样才能从WP7
- 25. 我怎样才能在Python
- 26. 我怎样才能标签
- 27. 我怎样才能在RSPEC
- 28. 我怎样才能在VB.net
- 29. 我怎样才能在vb.net
- 30. 我怎样才能在HTML5
“半”是什么意思?什么的一半?每个隐藏一半,或隐藏列表的一半? – 2013-03-04 23:09:50
可能是*半*你的意思是*一部分*? – bitmask 2013-03-04 23:10:32