我想根据本地代码和远程源代码之间的差异创建补丁。
我这样做是:
git diff origin/myTestBranch > myPatch.patch
我进入一个单独的目录,该目录克隆了相同的存储库,并且刚刚提取了myTestBranch。我使用
cd testPatchRepo
git clone ....
git checkout myTestBranch
当我尝试应用补丁时-失败!
但是,如果我使用git diff firstCommit ^...lastCommit > myPatch.patch
进行工作并创建补丁,该补丁没有问题 ......这不能解决我的问题,因为我仍然希望能够从我的本地未提交的工作中创建补丁。
这是从本地未提交的工作创建的补丁:
diff --git a/scripts b/scripts
index 8640468..adfabd7 160000
--- a/scripts
+++ b/scripts
@@ -1 +1 @@
-Subproject commit 8640468cc4ba87bebee0e9e26939361bcb3e3afa
+Subproject commit adfabd7bf11566f2888a4501bc557265f1172ac2-dirty
diff --git a/source/tutorial/install.txt b/source/tutorial/install.txt
index 5fee5f6..5ef6e4b 100644
--- a/source/tutorial/install.txt
+++ b/source/tutorial/install.txt
@@ -16,7 +16,7 @@ Install {+bi-short+} on Windows
.. include:: /includes/fact-bi-enterprise.rst
-Massaddie
+Maaaaassaddie
To set up |bi|,follow the steps on this page.
提交更改后创建的补丁:
commit 983393a03262f8dccfd90b3c948751846ae583ae
Author: maddie <myemail>
Date: Mon Dec 2 17:17:42 2019 -0500
commit before make stage commit
diff --git a/source/tutorial/install.txt b/source/tutorial/install.txt
index 5fee5f6..5ef6e4b 100644
--- a/source/tutorial/install.txt
+++ b/source/tutorial/install.txt
@@ -16,7 @@ Install {+bi-short+} on Windows
.. include:: /includes/fact-bi-enterprise.rst
-Massaddie
+Maaaaassaddie
To set up |bi| with a business intelligence tool such as Tableau,follow the steps on this page.