Re: the simplest way to add a file to my git repo and submit as a patch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx> writes:

>
> actually, a little experimentation suggests that this might be all i
> need:
>
>   - physically add <new file>
>   $ git add <new file>
>   $ git diff HEAD > patchfile
>   - physically remove <new file>
>   $ git rm <new file>
>
> what i get is a patch file that seems to fit the same pattern i'm used
> to submitting.  does the above look sane?
>

You are just looking at the changes in the index (from git add) versus
the last known committed state (HEAD).  It works, as long as you
don't need any changelog or history associated with the patch.  Really,
it's the same as "diff -u /dev/null newfile", except it adds
the git specific "new file mode" bits for git-apply.

	Eric

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux