Hmm... well those instructions are wrong I guess.<div><br></div><div>"git diff" is the diff of changes since the last commit that have <i>not</i> been staged. So once you've added a file via "git add", it won't show up anymore when you run "git diff".</div>
<div><br></div><div>If you want to see the diff between the last commit and staged files, run "git diff --cached"</div><div><br clear="all">--<br>Kyle Mathews<br><br>Blog: <a href="http://kyle.mathews2000.com/blog" target="_blank">kyle.mathews2000.com/blog</a><br>
Twitter: <a href="http://twitter.com/kylemathews" target="_blank">http://twitter.com/kylemathews</a><br><br>
<br><br><div class="gmail_quote">On Mon, Apr 11, 2011 at 10:16 AM, Dave Cohen <span dir="ltr"><<a href="mailto:drupal@dave-cohen.com">drupal@dave-cohen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm trying, and failing, to create a patch that adds new files to a module.<br>
<br>
According to <a href="http://drupal.org/node/707484" target="_blank">http://drupal.org/node/707484</a>, I should simply run `git add ...` then "Next time you run git diff, these new files will be included as well." In my experience, this statement is false.<br>
<br>
When I run `git status`, I see something like this:<br>
<br>
[dave@starbuck fb-3]$ git status<br>
# On branch 6.x-3.x<br>
# Changes to be committed:<br>
# (use "git reset HEAD <file>..." to unstage)<br>
#<br>
# new file: fb.process.inc<br>
# new file: fb_tab.js<br>
#<br>
# Changes not staged for commit:<br>
# (use "git add <file>..." to update what will be committed)<br>
# (use "git checkout -- <file>..." to discard changes in working directory)<br>
#<br>
# modified: README.txt<br>
# modified: contrib/fb_example.module<br>
# modified: fb.module<br>
# modified: fb_canvas.admin.inc<br>
# modified: fb_canvas.module<br>
# modified: fb_devel.module<br>
# modified: fb_settings.inc<br>
# modified: fb_tab.admin.inc<br>
# modified: <a href="http://fb_tab.info" target="_blank">fb_tab.info</a><br>
# modified: fb_tab.module<br>
# modified: fb_url_rewrite.inc<br>
<br>
<br>
When I run `git diff`, I see changes to all the modified files, but I do not see the new files.<br>
<br>
What am I missing? Thanks,<br>
<font color="#888888"><br>
-Dave<br>
</font></blockquote></div><br></div>