Procedure to merge from another repo into your QGIS GH clone:
In your original repo where you have stuff to merge. In my case my changes lived in a branch called 'sansa-branch'. I also wanted to bring my changes through as a single commit so I used the --squash option and merged my changes into a temporary branch:
git checkout master git branch temp git checkout temp git merge --squash sansa-branch git commit -m "SANSA branding and incorporate gcp tool" -a git format-patch master --stdout > /tmp/sansa-branch.patch git checkout master git branch -D temp
Ok now you have a nice patch living in /tmp/sansa-branch.patch, so we can go into our QGIS GH clone and apply it (in this case straight into master though typically you want to apply into a branch.
cd qgis-github-clone git apply /tmp/sansa-branch.patch
In my case the apply process produced the following output:
/tmp/sansa-branch.patch:162528: trailing whitespace. !define RELEASE_VERSION_NUMBER "1.7.0" /tmp/sansa-branch.patch:162529: trailing whitespace. !define RELEASE_VERSION_NAME "Wroclaw" /tmp/sansa-branch.patch:162530: trailing whitespace. !define RELEASE_SVN_REVISION "15643" /tmp/sansa-branch.patch:162577: trailing whitespace. /tmp/sansa-branch.patch:162578: trailing whitespace. %Module qgis.analysis 0 warning: squelched 8967 whitespace errors warning: 8972 lines add whitespace errors.
Ok so lets see that status of our repo now:
[qgis-github-clone] git status # On branch sansa-branch # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: .gitignore # modified: CMakeLists.txt # modified: images/splash/splash.png # modified: images/splash/splash.xcf.bz2 # modified: ms-windows/Installer-Files/UnWelcomeFinishPage.bmp # modified: ms-windows/Installer-Files/WelcomeFinishPage.bmp # modified: ms-windows/Installer-Files/sidelogomaster.xcf.bz2 # modified: ms-windows/QGIS-Installer.nsi # modified: ms-windows/quickpackage.sh # modified: python/CMakeLists.txt # modified: python/analysis/analysis.sip # modified: python/plugins/CMakeLists.txt # modified: src/analysis/CMakeLists.txt # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # python/analysis/qgsautogcpmanager.sip # python/analysis/qgsbilinearsampler.sip # python/analysis/qgscrosscorrelator.sip # python/analysis/qgsdatasource.sip # python/analysis/qgselevationmodel.sip # python/analysis/qgserror.sip # python/analysis/qgserrorlist.sip # python/analysis/qgsgcp.sip # python/analysis/qgsgcpset.sip # python/analysis/qgsgeoreferencer.sip # python/analysis/qgshasher.sip # python/analysis/qgsimageanalyzer.sip # python/analysis/qgsimagechip.sip # python/analysis/qgsimagefilter.sip # python/analysis/qgsmatrix.sip # python/analysis/qgsorthorectificationfilter.sip # python/analysis/qgsprojectionmanager.sip # python/analysis/qgsrasterdataset.sip # python/analysis/qgsrpcmodel.sip # python/analysis/qgssalientpoint.sip # python/analysis/qgssampler.sip # python/analysis/qgssensormodel.sip # python/analysis/qgssqldriver.sip # python/analysis/qgssqlitedriver.sip # python/analysis/qgswavelettransform.sip # python/plugins/autogcp/ # src/analysis/autogcp/ no changes added to commit (use "git add" and/or "git commit -a")
As you can see there are a bunch of untracked files, so I will just git add them:
[qgis-github-clone] git add python/analysis/*.sip [qgis-github-clone] git add python/plugins/autogcp/ [qgis-github-clone] git add src/analysis/autogcp/ [qgis-github-clone] git status # On branch sansa-branch # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: python/analysis/analysis.sip # new file: python/analysis/qgsautogcpmanager.sip # new file: python/analysis/qgsbilinearsampler.sip # new file: python/analysis/qgscrosscorrelator.sip # new file: python/analysis/qgsdatasource.sip # new file: python/analysis/qgselevationmodel.sip # new file: python/analysis/qgserror.sip # new file: python/analysis/qgserrorlist.sip # new file: python/analysis/qgsgcp.sip # new file: python/analysis/qgsgcpset.sip # new file: python/analysis/qgsgeoreferencer.sip # new file: python/analysis/qgshasher.sip # new file: python/analysis/qgsimageanalyzer.sip # new file: python/analysis/qgsimagechip.sip # new file: python/analysis/qgsimagefilter.sip # new file: python/analysis/qgsmatrix.sip # new file: python/analysis/qgsorthorectificationfilter.sip # new file: python/analysis/qgsprojectionmanager.sip # new file: python/analysis/qgsrasterdataset.sip # new file: python/analysis/qgsrpcmodel.sip # new file: python/analysis/qgssalientpoint.sip # new file: python/analysis/qgssampler.sip # new file: python/analysis/qgssensormodel.sip # new file: python/analysis/qgssqldriver.sip # new file: python/analysis/qgssqlitedriver.sip # new file: python/analysis/qgswavelettransform.sip # new file: python/plugins/autogcp/CMakeLists.txt # new file: python/plugins/autogcp/__init__.py # new file: python/plugins/autogcp/aboutdialog.py # new file: python/plugins/autogcp/aboutdialogbase.ui # new file: python/plugins/autogcp/autogcp.py # new file: python/plugins/autogcp/databasedialog.py # new file: python/plugins/autogcp/databasedialogbase.ui # new file: python/plugins/autogcp/demdialog.py # new file: python/plugins/autogcp/demdialogbase.ui # new file: python/plugins/autogcp/drivers/CMakeLists.txt # new file: python/plugins/autogcp/drivers/outputdrivers.db # new file: python/plugins/autogcp/gcpitem.py # new file: python/plugins/autogcp/gui.py # new file: python/plugins/autogcp/guibase.ui # new file: python/plugins/autogcp/help/.directory # new file: python/plugins/autogcp/help/CMakeLists.txt # new file: python/plugins/autogcp/help/DatabaseDialog # new file: python/plugins/autogcp/help/ImageInfoDialog # new file: python/plugins/autogcp/help/RectificationDialog # new file: python/plugins/autogcp/help/SettingsDialog # new file: python/plugins/autogcp/helpviewer.py # new file: python/plugins/autogcp/helpviewerbase.ui # new file: python/plugins/autogcp/icons/.directory # new file: python/plugins/autogcp/icons/CMakeLists.txt # new file: python/plugins/autogcp/icons/about.png # new file: python/plugins/autogcp/icons/addgcp.png # new file: python/plugins/autogcp/icons/algorithm.png # new file: python/plugins/autogcp/icons/autogcp.png # new file: python/plugins/autogcp/icons/connect.png # new file: python/plugins/autogcp/icons/cross.png # new file: python/plugins/autogcp/icons/database.png # new file: python/plugins/autogcp/icons/delete.png # new file: python/plugins/autogcp/icons/deleteall.png # new file: python/plugins/autogcp/icons/disconnect.png # new file: python/plugins/autogcp/icons/export.png # new file: python/plugins/autogcp/icons/flagblue.png # new file: python/plugins/autogcp/icons/flaggreen.png # new file: python/plugins/autogcp/icons/flagred.png # new file: python/plugins/autogcp/icons/flagyellow.png # new file: python/plugins/autogcp/icons/foxhat.png # new file: python/plugins/autogcp/icons/gcp.png # new file: python/plugins/autogcp/icons/general.png # new file: python/plugins/autogcp/icons/import.png # new file: python/plugins/autogcp/icons/info.png # new file: python/plugins/autogcp/icons/loaddb.png # new file: python/plugins/autogcp/icons/metadata.png # new file: python/plugins/autogcp/icons/movegcp.png # new file: python/plugins/autogcp/icons/ortho.png # new file: python/plugins/autogcp/icons/pan.png # new file: python/plugins/autogcp/icons/pinblue.png # new file: python/plugins/autogcp/icons/pingreen.png # new file: python/plugins/autogcp/icons/pinred.png # new file: python/plugins/autogcp/icons/pinyellow.png # new file: python/plugins/autogcp/icons/projection.png # new file: python/plugins/autogcp/icons/raster.png # new file: python/plugins/autogcp/icons/removegcp.png # new file: python/plugins/autogcp/icons/savedb.png # new file: python/plugins/autogcp/icons/settings.png # new file: python/plugins/autogcp/icons/symbology.png # new file: python/plugins/autogcp/icons/unload.png # new file: python/plugins/autogcp/icons/userinterface.png # new file: python/plugins/autogcp/icons/zoomimage.png # new file: python/plugins/autogcp/icons/zoomin.png # new file: python/plugins/autogcp/icons/zoomout.png # new file: python/plugins/autogcp/imagedialog.py # new file: python/plugins/autogcp/imagedialogbase.ui # new file: python/plugins/autogcp/marker.py # new file: python/plugins/autogcp/progressdialog.py # new file: python/plugins/autogcp/progressdialogbase.ui # new file: python/plugins/autogcp/projectiondialog.py # new file: python/plugins/autogcp/projectiondialogbase.ui # new file: python/plugins/autogcp/rectificationdialog.py # new file: python/plugins/autogcp/rectificationdialogbase.ui # new file: python/plugins/autogcp/resources.qrc # new file: python/plugins/autogcp/settings.py # new file: python/plugins/autogcp/settingsdialog.py # new file: python/plugins/autogcp/settingsdialogbase.ui # new file: python/plugins/autogcp/xmlhandler.py # new file: src/analysis/autogcp/qgsabstractoperation.h # new file: src/analysis/autogcp/qgsautogcp.h # new file: src/analysis/autogcp/qgsautogcpmanager.cpp # new file: src/analysis/autogcp/qgsautogcpmanager.h # new file: src/analysis/autogcp/qgsbilinearsampler.cpp # new file: src/analysis/autogcp/qgsbilinearsampler.h # new file: src/analysis/autogcp/qgscoordinatesystemtransform.cpp # new file: src/analysis/autogcp/qgscoordinatesystemtransform.h # new file: src/analysis/autogcp/qgscrosscorrelator.cpp # new file: src/analysis/autogcp/qgscrosscorrelator.h # new file: src/analysis/autogcp/qgsdatasource.cpp # new file: src/analysis/autogcp/qgsdatasource.h # new file: src/analysis/autogcp/qgselevationmodel.cpp # new file: src/analysis/autogcp/qgselevationmodel.h # new file: src/analysis/autogcp/qgserror.h # new file: src/analysis/autogcp/qgserrorlist.cpp # new file: src/analysis/autogcp/qgserrorlist.h # new file: src/analysis/autogcp/qgsgcp.cpp # new file: src/analysis/autogcp/qgsgcp.h # new file: src/analysis/autogcp/qgsgcpset.cpp # new file: src/analysis/autogcp/qgsgcpset.h # new file: src/analysis/autogcp/qgsgcptransform.cpp # new file: src/analysis/autogcp/qgsgcptransform.h # new file: src/analysis/autogcp/qgsgeoreferencer.cpp # new file: src/analysis/autogcp/qgsgeoreferencer.h # new file: src/analysis/autogcp/qgshasher.cpp # new file: src/analysis/autogcp/qgshasher.h # new file: src/analysis/autogcp/qgsimageanalyzer.cpp # new file: src/analysis/autogcp/qgsimageanalyzer.h # new file: src/analysis/autogcp/qgsimagechip.cpp # new file: src/analysis/autogcp/qgsimagechip.h # new file: src/analysis/autogcp/qgsimagefilter.cpp # new file: src/analysis/autogcp/qgsimagefilter.h # new file: src/analysis/autogcp/qgsmatrix.cpp # new file: src/analysis/autogcp/qgsmatrix.h # new file: src/analysis/autogcp/qgsmatrix.h.astyle # new file: src/analysis/autogcp/qgsorthorectificationfilter.cpp # new file: src/analysis/autogcp/qgsorthorectificationfilter.h # new file: src/analysis/autogcp/qgspointsampler.cpp # new file: src/analysis/autogcp/qgspointsampler.h # new file: src/analysis/autogcp/qgspostgresdriver.cpp # new file: src/analysis/autogcp/qgspostgresdriver.h # new file: src/analysis/autogcp/qgsprojectionmanager.cpp # new file: src/analysis/autogcp/qgsprojectionmanager.h # new file: src/analysis/autogcp/qgsrasterdataset.cpp # new file: src/analysis/autogcp/qgsrasterdataset.h # new file: src/analysis/autogcp/qgsrpcmodel.cpp # new file: src/analysis/autogcp/qgsrpcmodel.h # new file: src/analysis/autogcp/qgssalientpoint.h # new file: src/analysis/autogcp/qgssampler.h # new file: src/analysis/autogcp/qgssensormodel.h # new file: src/analysis/autogcp/qgssqldriver.cpp # new file: src/analysis/autogcp/qgssqldriver.h # new file: src/analysis/autogcp/qgssqlitedriver.cpp # new file: src/analysis/autogcp/qgssqlitedriver.h # new file: src/analysis/autogcp/qgstpstransform.cpp # new file: src/analysis/autogcp/qgstpstransform.h # new file: src/analysis/autogcp/qgswavelettransform.cpp # new file: src/analysis/autogcp/qgswavelettransform.h # # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: .gitignore # modified: CMakeLists.txt # modified: images/splash/splash.png # modified: images/splash/splash.xcf.bz2 # modified: ms-windows/Installer-Files/UnWelcomeFinishPage.bmp # modified: ms-windows/Installer-Files/WelcomeFinishPage.bmp # modified: ms-windows/Installer-Files/sidelogomaster.xcf.bz2 # modified: ms-windows/QGIS-Installer.nsi # modified: ms-windows/quickpackage.sh # modified: python/CMakeLists.txt # modified: python/plugins/CMakeLists.txt # modified: src/analysis/CMakeLists.txt
Finally you can git commit to save your patch into your local repo and then push on up to QGIS GH when you are ready.