merging directories
-
I know this is a wtf, which is why I'm trying to fix it.
I have two nearly identical copies of an important source/config directory on two separate machines. They really ought to be the same (i.e., local changes in each need to get merged). Neither is in version control right now.
What's a good workflow for doing this?
1 Git repos in each
2 pushing the left one to bitbucket (for convenience in future)
3 stashing the right one
4 pulling from the remote repo onto the right one
5 trying to merge the stash
6 never leaving changes uncommitted again?Ugh I don't want to step on my dick on this.
-
Merging from a stash has always been a bit wonky for me... What about just moving the MachineB file aside, pulling, copying it back. And then deal with merging by just looking at the diffs?
-
@dcon said in merging directories:
Merging from a stash has always been a bit wonky for me... What about just moving the MachineB file aside, pulling, copying it back. And then deal with merging by just looking at the diffs?
That's a good idea.
-
@Captain if you have a common ancestor, I would:
- Commit the common ancestor
- Branch it and commit version A
- Create another branch and commit version B
- Merge with kdiff3
Without a common ancestor, I would probably use winmerge to merge them directly before committing somewhere.
-
How big of a problem is it, really? First thing I'd do would be to identify which files had changes and which didn't. A couple of files to merge might not be a big deal. A lot of files to merge might call for a more disciplined approach.
Simple thing would be to start a repo from one (NB: work with copies of the data only), then copy the files over from the other one and see what changed. If nothing else that will make you feel better about the magnitude of the problem (or maybe the opposite but at least you'll know).
-
Before setting up repos you could do
dir /o/s > list.txt
on each directory and compare those files.
-
-
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
-
-
@Zecc said in merging directories:
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
-
@TimeBandit I use it often. Despite the terrible file dialogs and the occasional crashes it's actually pretty decent.
The dialogs can be worked around by using drag and drop. You can actually drop files and directories on the buttons that otherwise trigger the open dialogs. Intuitive!
-
@Zecc said in merging directories:
You can actually drop files and directories on the buttons that otherwise trigger the open dialogs. Intuitive!
Not sure if you mean it straight or sarcastically - but yes, it is quite intuitive. It's also how the standard "select file to upload" button works in modern browsers. Very convenient.
-
@Gąska said in merging directories:
Not sure if you mean it straight or sarcastically
Straight. Although I didn't expect it to work. I was quite surprised when it did.
-
On the other hand if I want to paste a path, I need to type
/
or pressCtrl+L
. Grrr.
-
@Cursorkeys said in merging directories:
@Zecc said in merging directories:
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
How do you guys convince managers to spend on these things?
-
@sockpuppet7 said in merging directories:
@Cursorkeys said in merging directories:
@Zecc said in merging directories:
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
How do you guys convince managers to spend on these things?
Buy first, ask for forgiveness if it gets questioned mostly. I don't buy anything unless it's necessary though.
Edit: if you don't have a company CC then make the case to your manager in the form of why it will save him money (your time on the task, etc... )
-
@Cursorkeys Don't tell them all the secrets of leadership material. ;-)
-
@sockpuppet7 said in merging directories:
@Cursorkeys said in merging directories:
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
How do you guys convince managers to spend on these things?
I'm glad someone at a former workplace convinced them to buy a site license for it. It was even in the library of "software anyone can install without admin rights."
Later I bought a copy for my own work.
-
@boomzilla It turns out it about about 15 text files, but they were all important changes that took many hours to figure out.
I copied one into the other as instructed, and thought about using git mergetool to resolve. I couldn't find a way to make it "resolve" the working copy and the HEAD, so I went with
$ git diff > monosyllabic.patch $ vim monosyllabic.patch $ patch -R < monosyllabic.patch
-
-
@Cursorkeys said in merging directories:
@sockpuppet7 said in merging directories:
@Cursorkeys said in merging directories:
@Zecc said in merging directories:
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
How do you guys convince managers to spend on these things?
Buy first, ask for forgiveness if it gets questioned mostly. I don't buy anything unless it's necessary though.
Edit: if you don't have a company CC then make the case to your manager in the form of why it will save him money (your time on the task, etc... )
Problem is I'll never find out if beyond compare is that great, because I never could use it, enough and I'm not putting my own money to find out. Now I'm used to kdiff3, and I guess it would take time for me to get used with something else enough to do better with that. I suppose that happens to a lot of tools.
-
@PJH No. My tall black hard drive is "monolith 2.0", after my last tall black hard drive that died.
I like 'monosyllabic' because it's a word that isn't what it describes. 'Short' is arguably short, for example. But 'monosyllabic' very much isn't. Also, my projects tend to have monosyllabic names, like
prompt
orp
(in thebook
directory). And of course, my standard book template is named.book
and lives in thebook
directory so I can clone it and just get to work. Also, all the best words are monosyllabic, and usually have 4 letters. So I should probably hate it instead. Life is funny that way.I guess I'm a pretty simple guy.
So in this context, it was
monosyllabic.patch
, because I was putting monosyllabic (the original) on top of the git repo (monosyllabic.hyperv.patched
).
-
@Captain said in merging directories:
I like 'monosyllabic' because it's a word that isn't what it describes. '
Anti-onomatopoeic? Phonetically heterological?
I'll stop now.
-
@PJH In the context of the Grelling-Nelson Paradox, it's called "heterological" for having this property (as opposed to autological words like "short" and "noun" or "Pavlovian").
Gosh remember when there were cool websites around like
-
@Captain said in merging directories:
Also, all the best words are monosyllabic, and usually have 4 letters.
My favorite monosyllabic word is chrząszcz.
-
@Gąska said in merging directories:
My favorite monosyllabic word is chrząszcz.
Squelched.
Now that I belatedly realise we're in a help topic - was the help sought, found?
-
@Gąska WOH intense how is it pronounced? Listening to it online, it sounds like schongsched
-
@Captain roughly "hshonshch". The leading "h" is important.
-
@sockpuppet7 said in merging directories:
Problem is I'll never find out if beyond compare is that great, because I never could use it, enough and I'm not putting my own money to find out. Now I'm used to kdiff3, and I guess it would take time for me to get used with something else enough to do better with that. I suppose that happens to a lot of tools.
In this case you can, if you want.It has a 30 day trial, and that's 30 days where you actually open it, not 30 days from first use. Very generous.
-
@Cursorkeys said in merging directories:
@Zecc said in merging directories:
@TimeBandit said in merging directories:
Meld can compare 2 directory content
And there's even a Windows version
GTK FILE DIALOG WARNING
If anyone wants to spend money then Beyond Compare does a really nice job for visual diffs and merging. All native dialogs too.
I finally broke down and spent my own money on it. Worth it!
-
@PJH Mostly, I'm working on it and may have updates. I got excited about printing some pictures for my cubicle, like:
-
@Gąska said in merging directories:
chrząszcz
How is that pronounced? Like if you dropped a drinking glass?
Also TIL there is
:fa_hand_lizard_o:
:
-
@Captain said in merging directories:
The page is missing my favorite autological word: judgmental. Though I suppose one could argue that the word itself is not autological, as it does not exactly describe the word itself as a word, but rather the inherent usage of the word.
-
@Zecc said in merging directories:
@Gąska said in merging directories:
chrząszcz
How is that pronounced? Like if you dropped a drinking glass?
Also TIL there is
:fa_hand_lizard_o:
:
-
@Tsaukpaetra that's a good song
-
-
-
-
@Zecc Does it do whatever a spider can?
-