
EB> On Stack Overflow I discover this, which might help: git diff EB> --name-only <some-other-branch> will show you what files are EB> different between your current branch and <some-other-branch> EB> Here’s the post: EB> http://stackoverflow.com/questions/10641361/git-get-all-files-that-have-been... EB> Does that work? Not exactly what I was looking for, but very helpful. Probably close enough for now, thank you. EB> And on merging just one file into dev, here’s something to look EB> at: EB> http://stackoverflow.com/questions/10784523/how-do-i-merge-changes-to-a-sing... EB> Following the advice here, you’d checkout the dev branch, and EB> apply a patch from your sydb-occurs branch to just one of the EB> files there… I had tried this, and it did not seem to work. Executing the command gave me a bunch of choices for each "hunk" of text that was different. I said 'a' (apply all hunks). This seemed to make a modification to the local file awaiting to be committed; i.e. `git status` said the file in question was modified. But then when I asked git what changes had been made to that file, it said there were none; i.e., `git diff` reported no differences. But then I tried again to demonstrate to you that this didn't work. On this 2nd test run I actually ran a regular diff against a known copy, rather than git diff for working copy vs committed (local repo) copy. And it seems to have worked! But it is awfully peculiar, and quite unnerving, that `git diff` does not think it worked. Now I don't know what to do. EB> Wait a second…This might be a better solution, on how to select EB> particular files from one branch to merge into another branch: EB> http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-... EB> Seems simpler! Let us know what works..! It might be, but the exact same thing happens. See below. I had not tried this method at first, because the prose specifically says this method is for files that don't yet exist in the dev branch. But after you posted I did try it, and the exact same thing happens as with the '--patch' switch, except I don't get a choice as to which hunks to apply. See below. RV> Also a simple way to check which files have been changed and not RV> yet committed in your branch is RV> git status RV> To see the changes themselves use RV> git diff True, but not the problem I'm having here. below ----- I have 3 copies of the Stylesheets/ repo here in my current directory: _dev and _sydb-occurs are checked out to the named branch, up-to-date, and read-only. _test is read-write for experimenting. | dr-xr-xr-x 50 4.0K Nov 18 11:20 Stylesheets_dev/ | dr-xr-xr-x 49 4.0K Nov 15 16:29 Stylesheets_sydb-occurs/ | drwxrwxr-x 49 4.0K Nov 15 16:29 Stylesheets_test/ Here is an abbreviated and annotated console listing of what I did. | $ cd Stylesheets_test/ | $ git status -uno | On branch dev | Your branch is up-to-date with 'origin/dev'. | nothing to commit (use -u to show untracked files) | $ git checkout sydb-occurs | Branch sydb-occurs set up to track remote branch sydb-occurs from origin. | Switched to a new branch 'sydb-occurs' | $ git pull | Already up-to-date. | $ git checkout dev | Switched to branch 'dev' | Your branch is up-to-date with 'origin/dev'. | $ git status -uno | On branch dev | Your branch is up-to-date with 'origin/dev'. | nothing to commit (use -u to show untracked files) | | ; # first, make sure there are no mods to local working copy vs local dev repo | ; # (There should not be, `git status` says there aren't) | $ git --no-pager diff -U0 odds/odd2odd.xsl | ; # Good, no differences | | ; # test that local test copy is same as local dev copy ... | $ diff -C0 odds/odd2odd.xsl ../Stylesheets_dev/odds/odd2odd.xsl | ; # (it is) | | $ # ... and different from local sydb-occurs copy ... | $ diff -C0 odds/odd2odd.xsl ../Stylesheets_sydb-occurs/odds/odd2odd.xsl | *** odds/odd2odd.xsl 2016-11-19 19:44:13.818808272 -0500 | --- ../Stylesheets_sydb-occurs/odds/odd2odd.xsl 2016-11-19 14:15:57.035837976 -0500 | *************** | *** 25 **** | ! | --- 25 ---- | ! | *************** | *** 61 **** | ! <xsl:param name="defaultSource"></xsl:param> | --- 61 ---- | ! <xsl:param name="defaultSource"/> | $ ######### 1600 lines of `diff` output deleted here ######### | *************** | *** 2240 **** | ! <xsl:apply-templates select="*|@*|text()|processing-instruction()" mode="pass4"/> | --- 2171 ---- | ! <xsl:apply-templates select="@*|*|text()|processing-instruction()" mode="pass4"/> | *************** | *** 2247 **** | ! <xsl:apply-templates select="*|@*|text()|processing-instruction()" mode="pass4"/> | --- 2178 ---- | ! <xsl:apply-templates select="@*|*|text()|processing-instruction()" mode="pass4"/> | *************** | *** 2252 **** | - | --- 2182 ---- | ; # (and it is *very*) different | | ; # issue command we are testing | $ git checkout sydb-occurs odds/odd2odd.xsl | | ; # did it do anything? | $ git status -uno | On branch dev | Your branch is up-to-date with 'origin/dev'. | Changes to be committed: | (use "git reset HEAD <file>..." to unstage) | | modified: odds/odd2odd.xsl | | Untracked files not listed (use -u option to show untracked files) | | ; # Yay! We have a modified version, modifications must be the ones we want. | ; # Let's actually see what the difference is (between new local copy | ; # and the committed dev version): | $ git --no-pager diff -U0 odds/odd2odd.xsl | ; # Oops ... no difference. ??? | | ; # So if there's no difference there, there should be no difference | ; # between this local copy and the dev working copy. Let's see ... | $ diff -C0 odds/odd2odd.xsl ../Stylesheets_dev/odds/odd2odd.xsl | *** odds/odd2odd.xsl 2016-11-19 19:45:56.985390835 -0500 | --- ../Stylesheets_dev/odds/odd2odd.xsl 2016-11-18 11:54:22.943262068 -0500 | *************** | *** 25 **** | ! | --- 25 ---- | ! | *************** | *** 61 **** | ! <xsl:param name="defaultSource"/> | --- 61 ---- | ! <xsl:param name="defaultSource"></xsl:param> | ; ######### 1605 lines of diff output deleted here ######### | *************** | *** 2178 **** | ! <xsl:apply-templates select="@*|*|text()|processing-instruction()" mode="pass4"/> | --- 2247 ---- | ! <xsl:apply-templates select="*|@*|text()|processing-instruction()" mode="pass4"/> | *************** | *** 2182 **** | --- 2252 ---- | + | ; # oh dear, they are *very* different | | ; # is the local working copy the same as the sydb-occurs working copy? | $ diff -C0 odds/odd2odd.xsl ../Stylesheets_sydb-occurs/odds/odd2odd.xsl | ; # Yup.