Find the answer to your Linux question:
Results 1 to 2 of 2
I could simply do: Code: $ git diff > patchfile.patch if I haven't setup [diff] external = extDiff I can temporary disable this external GUI diff tool. But just wondering ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! legendbb's Avatar
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    27

    Smile Create git patch for uncommitted changes?


    I could simply do:
    Code:
    $ git diff > patchfile.patch
    if I haven't setup [diff] external = extDiff

    I can temporary disable this external GUI diff tool. But just wondering if
    Code:
    $ git format-patch
    would have built in support for generating such patch.



    Great thanks,

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769
    I don't the way to do that..but why not commit the changes and take patch using "git format-patch -M -1" and then do "git reset --hard <previous-patch-commit-id>"
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •