vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

Suggestion of changing the commands to install and update a plugin

Open 12425 opened this issue 6 years ago • 3 comments

I suggest run this command to install a plugin: git clone -b master --single-branch --depth 1 {repo} This command to update a plugin: git fetch --depth 1 origin master && git reset --hard @{u}

Explanation:

  1. We don't need to download history commits, so --single-branch --depth 1 is better.
  2. The plugin folders are not supposed to be touched by user. Therefore, reset --hard is better than pull as sometimes pull doesn't work because of local changes by any reasons.

12425 avatar Apr 23 '18 21:04 12425

I also need "--depth 1", how to option for this

hyaray avatar Aug 30 '19 00:08 hyaray

I agree. For example updating nerd-fonts takes forever (and A LOT of space) because that repo is huge AND has a lot of stale branches. --no-single-branch was the issue. I wonder why that's needed?

Btw, man git-clone states that --depth N imples --single-branch.

paddor avatar May 06 '21 10:05 paddor

IMO this could also be a config option of vim-plug itself. Some users might actually want to see the history of all the commits.

ForeverNooob avatar Sep 20 '22 05:09 ForeverNooob