On Thu, Dec 15, 2011 at 7:21 PM, Gustaf Nilsson <[email protected]> wrote: > OK, so i did "git diff origin/master > showcase.patch", but then it > doesnt include my new files i created. > > so i hear theres this "git add blabla" but when i use it, it suddenly > adds a bunch of other files to my patch that i never touched??
... :-( ok. i take it all the "extra" files are a bunch of JS files? those are build products from you compiling stuff -- they *should* be ignored, but due to some other reasons they aren't ATM. yeah my instructions were banking on the idea that you hadn't created new files, and i forgot about the ignore problem ... soooo, make a backup, and get ready for some fun. first note: `git add .` is recursive and BAD! don't use it in that form ... ever ... with the exception of the very first commit to a NEW project. second note: `git diff` only shows files that are *already* tracked (hence the reason you didn't see your new files in the diff). since you have created new files, the best way is to individually `git add` EVERY added OR modified. this is really how you should do it every time, and if there is a lot of files to add, you are committing often enough ;-) : # git add <file one> # git add <file two> # git add <file xyz> # git diff --cached ^^^^^^ make sure this shows ONLY your changes/additions! # git commit # git diff ^^^^^^ should show NOTHING # git diff origin/master ^^^^^^ should show your patch # git diff HEAD~1 ^^^^^^ same as above, i just wanted to be cool # git diff origin/master > bug667.patch ... lmk how that goes. i'll try to fix that ignore problem sometime in next few days. -- C Anthony

