-
Notifications
You must be signed in to change notification settings - Fork 31
GitPullConflictExample
Most of the time there shouldn't be any conflict with your configuration files so you can keep your configuration intact across updated sub-versions.
To give you an example in case there is a conflict with one file this is what it could look like:
git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 1), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/aodn/imos-toolbox
af92a16..c1187a6 2.5 -> origin/2.5
b46e023..d598814 master -> origin/master
* [new tag] v2.5.6 -> v2.5.6
Updating 6baa8f3..c1187a6
error: Your local changes to the following files would be overwritten by merge:
toolboxProperties.txt
Please, commit your changes or stash them before you can merge.
Aborting
then I recommend you create a new branch to which you will commit your changes responsible for conflicts:
git checkout -b MY_NEW_BRANCH
git add toolboxProperties.txt
git commit -m 'conflicting files'
Let's go back to branch 2.5, we should now be able to pull updates:
git checkout 2.5
git pull
Now let's have a look at the nature of the conflicts one file at a time:
git diff MY_NEW_BRANCH..2.5 -- toolboxProperties.txt
diff --git a/toolboxProperties.txt b/toolboxProperties.txt
index 5d77349..bf710d5 100644
--- a/toolboxProperties.txt
+++ b/toolboxProperties.txt
@@ -1,6 +1,6 @@
% filename or ODBC DSN of MS-ACCESS deployment database
% ex. : /home/ggalibert/OceanDB.mdb or imos-ddb
-toolbox.ddb = /home/ggalibert/OceanDB.mdb
+toolbox.ddb =
% or full connection details to other kind of deployment database :
% class name of JDBC database driver
@@ -91,3 +91,12 @@ saveGraph.imgType = png
% visual QC plots export properties
visualQC.export = true
visualQC.fastScatter = true
+
+% default nonspecialized scalar colormap and number of colour steps
+% jet | parula | viridis
+visualQC.defaultColormap = parula
+visualQC.ncolors = 64
+
+% simple zbuffering of markers if using fallback fastScatterMesh plot (fastScatter = false)
+% 'ascending', 'descending', 'triangle', 'vee', 'flat', 'parabolic', 'hamming', 'hann'
+visualQC.zbuffer = triangle
The first change is my path to my deployment database which has been reset. This was the conflict and I want to keep this local change so I should open toolboxProperties.txt and document the path to my deployment database back in it. I can see that my new version of toolboxProperties.txt includes some new entries that don't impact any of my existing personal changes so I can leave them.
Of course if your conflicts involve more than one file then you would need to fix them one after the other.
I can now delete my temporary MY_NEW_BRANCH branch:
git branch -D MY_NEW_BRANCH