Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-14208

Patch created from SourceTree (Actions/Create Patch) is in wrong order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • 3.4.9
    • General
    • None
    • Minor

    Description

      I selected my range of commits with shift + click, then the patch is created successfully, but i have a surprise when applying it. When i open the patch in editor, i can see that the first commit appears second, and also other commits are in wrong order. In my case, the first commit created a file and second commit edited the file created, so applying it in wrong order lead to a conflict (modification vs "deletion", since the file does not exist).

      Since i dont want to solve those conflicts manually, and i don't want to edit manually the wrong ordered commits, i had to find a workaround to sourcetree "Create patch". Here is my workaround, using git bash : 

       

      git format-patch 86d1e2a32f2d284c9f232082948452ed61b41351^..HEAD --output myPatch.patch
      
      (and then to apply : git am myPatch.patch)

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            3629a8574036 Tristan_Mesureau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: