# Manually Merging Files



## dave (Nov 30, 2009)

When upgrading to FreeBSD 8.0, I need to manually merge a file.


```
[the beginning of my file]
<<<<<<< current version
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
HOME=/var/log
=======
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
>>>>>>> 8.0-RELEASE
[the rest of my file]
```

Can someone explain what this is supposed to mean?  How do I know which is stuff to keep and which is old?

I know this is a silly question, but the angle-brackets do not make this obvious at all, and I think it deserves clarification.


----------



## SirDice (Nov 30, 2009)

The easiest way is to do it when mergemaster asks about it. Just pick (m)erge. (L)eft will be the 'old' config, (R)ight the 'new' one. Just pick L or R accordingly. Review your merged file with (v)iew.


----------



## dave (Nov 30, 2009)

SirDice said:
			
		

> The easiest way is to do it when mergemaster asks about it. Just pick (m)erge. (L)eft will be the 'old' config, (R)ight the 'new' one. Just pick L or R accordingly. Review your merged file with (v)iew.



I did not receive the mergemaster prompt.  I have been asked to manually merge a file by freebsd-update.


----------



## phoenix (Nov 30, 2009)

<<<<<< means the old file.

>>>>>> means the new file.

In your case, it picked up that the PATH was different in the new version, and is asking you what to do.  Either take the new PATH and edit it later, or take the old PATH.


----------



## dave (Nov 30, 2009)

So, delete this...


```
<<<<<<< current version
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
HOME=/var/log
=======
```

and this...


```
>>>>>>> 8.0-RELEASE
```

...and keep this:


```
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
```

?


----------



## phoenix (Dec 3, 2009)

If that's the PATH setting that you want, then yes.  Otherwise keep the old PATH setting.  The only difference is /usr/local/bin.  Figure out if you need that in the PATH or not.


----------

