Howdy reader,
sorry for starting this like a letter but, what does it matter anyway?
So, today, I walked up to a badass dev maintaining a certain repo. I happened to have worked on the same project, locally. For us to merge changes, there needs to be recorded changes, staging. He asked me for my changes, the files I'd worked on, so that he can merge.
If we were on the same repo git would save us, frget this for now.
So, I was like, damn! I lost track of what I changed (GIT didn't). So, I googled a little and stumbled on it. The super formula. The ones all witches been fighting to lay hands on...joking.
List files changed
To list the files changed, you need to specify some stuff, not much. how many commits back.
see below.
git diff --name-only HEAD HEAD~3
The three is the number of commits. The files are listed as paths.. cool, right.
Not Cool Yet
Remember, files are needed, not paths...so I tweaked something...git archive. See below.
git archive compresses what you give it, to whatver format you specify, ie zip and saves to your current working directory.
Command
list
Now I can forward the zip, with only the files I touched. If there're changes in a file and he also worked on it, well, keep it here...remind me if I forget to write about it.