The last few times that I've run n-update, I've received errors similar to the following:
$ n-update
Check for updates to n (version 2.1.3, installed in '/home/user/.n/n')? (y/N) y
-- Checking for updates...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/tj/n
+ 55a021b...560670e master -> origin/master (forced update)
* [new tag] v2.1.4 -> v2.1.4
fatal: refusing to merge unrelated histories
n-update: ERROR: ABORTING due to unexpected error.
I would guess that this is caused by the --depth 1 flag (discussed in #6 and introduced in 9e9347d). Because there is no history, instead of just pulling in the changes, git thinks you are trying to merge two different entirely unrelated projects together. You can use --allow-unrelated-histories to ignore the warning, but then you end up with a bunch of merge conflicts. Assuming that's the problem, maybe replace git pull --depth 1 with something like git fetch --depth 1 && git reset --hard origin/master?
The last few times that I've run
n-update, I've received errors similar to the following:I would guess that this is caused by the
--depth 1flag (discussed in #6 and introduced in 9e9347d). Because there is no history, instead of just pulling in the changes, git thinks you are trying to merge two different entirely unrelated projects together. You can use--allow-unrelated-historiesto ignore the warning, but then you end up with a bunch of merge conflicts. Assuming that's the problem, maybe replacegit pull --depth 1with something likegit fetch --depth 1 && git reset --hard origin/master?