How do I uninstall a plugin I installed with pathogen?
Locate your bundle folder which should be in:
Linux/Mac: ~/.vim/bundle
Windows XP: C:\Documents and Settings\(UserName)\vimfiles\bundle
Windows7: C:\Users\(UserName)\vimfiles\bundle
Delete the folder of the plugin you want to delete.
Note: If you chose a different directory for pathogen to install your plugin then locate that folder and delete the plugin folder accordingly.
Restart Vim
Tip: In Vim type :echo $HOME to see your Vim home directory
Pathogen installs plugins as git submodules. Therefore uninstalling a plugin is removing a git submodule. Taking 'vim-rvm' as example plugin.
git submodule deinit bundle/vim-rvm
git rm bundle/vim-rvm
git rm --cached bundle/vim-rvm
rm -rf .git/modules/bundle/vim-rvm
Do the reverse of what you did to install it.
Related
I recently uninstalled pre-commit from my environment. I performed the following in pipenv:
pipenv --rm
<deleted Pipfile and Pipfile.lock>
pipenv install -r requirements.txt
I ensured that the pre-commit module was no longer in the requirements.txt. When I make a git commit I get:
~/my_project/.venv/bin/python: No module named pre_commit
This is preventing me from committing, and I have no idea where this is coming from, since pre-commit is not being installed. Further, the traceback path specified is pointing to python and not python3. What am I missing?
typically the way to remove the hook installed by pre-commit install is to call pre-commit uninstall -- though if you've removed pre-commit from your system you can remove the hook scripts manually
you can usually find them by doing:
grep pre-commit.com .git/hooks/*
as that marker is listed in the hook files
from there you can delete them:
grep -l pre-commit.com .git/hooks/* | xargs rm
disclaimer: I made pre-commit
There are still pre-commit hooks installed in your git repository. You can remove them by simply deleting .git/hooks/pre-commit in you repository, after which pre-commit won't be called anymore when commiting.
When trying to clone a repo with git on a Red Hat Enterprise Linux server:
git clone https://github.com/user/repo.git
I receive an error with output:
fatal: Unable to find remote helper for 'https'
I noticed the error when trying to install packages with Vundle for vim. When I looked at the log i found that it was git that was causing the error. The problem is not present when separately running:
sudo git clone https://github.com/user/repo.git
... and running:
/usr/bin/git clone https://github.com/user/repo.git
... also worked fine. Since I run git through vim in this case I want it to work with just the git command.
I have tried to uninstall all the yum-installed git-related packages. I have also tried the approach in this Stackoverflow answer without any results. I have tried to install the latest git from source with this tutorial.
After 2/3 of a work day trying to figure out what was wrong i manually removed every git-related file and directory i could find. Then i simply reinstalled git with
sudo yum install git
Now is everything working fine.
So try doing
find /usr/ -name 'git*' -type d
to find the git-related directories, then remove all these directories. After this you do a new search and pipe that into less to handle the possible large output,
find /usr/ -name 'git*' | less
take note of the exec files and remove them. Mine where in /usr/local/bin. After this you reinstall git with yum like above.
I have run
git init
npm install --save-dev webpack
Then, there is a package.json and a node_modules directory in the root directory.
I want to add the node_modules directory into git repo.
After I run
git add .
There is no response any more. And I found the git.exe process occupy more and more memory usage , but there is not any response after several hours.
What is wrong with it?
Is it caused by pretty much files to be added into repo by git?
How can I debug what happens in detail when that command is executed?
Everything works fine if I just git add some other files/folder which is not node_modules.
Have you git init the repo folder? If yes, then you can run git status. There you should see any new or changed folder.
If node_modules is not mentioned, I guess you have a .gitignore file in your project folder. If you want to git add the node modules folder you will need to remove node_modules/ from .gitignore.
npm install --save-dev webpack will just add one more dependency in package.json and install webpack in your node local repo. This is not a git related command.
Check also this question: Git - Ignore node_modules folder everywhere
Hopfully this will help,
I figured out myself.
This is caused by pretty much symlinks in the node_modules directory. If i evaluated the git-bash as administrator, the new installed node_module symlinks can be created as linux. And then when git add works well. Maybe, if without evaluated git-bash, git-bash can not create symlinks which cause pretty much files need to be git added, even worse maybe a circular reference between symblink and node module staff (not sure), that cause memory consumption of git increase always and no response.
Hope it can help others if met the same problem on windows.
I'm using homebrew for my management of Ruby Gems and Node/NPM. I've tried to keep everything in homebrew's default path of /usr/local. However there are still some directories being created in my $HOME and I'd like to know if it is safe to delete them?
~/.bundle
~/.config
~/.gem
~/.npm
I have a Git repository on a server and on the same server I have a script which needs to do a git archive of the repository.
Here's my sample git archive command which works well for remote Git repositories:
sudo git archive --remote=ssh://uname#dev.example.com/var/repo/myrepo.git --format=tar --output=src.tar development
What would I need to do/change to execute the aforementioned command on the same server so that I don't need to put all the SSH stuff? Since the command is running on the same machine as the repository, can I get away with directly accessing the Git directory.
Thanks
Use
cd .../yourcode
sudo git archive --format=tar --output=src.tar development
(it is probably unnecessary to sudo)
Sure. Just run git archive from the directory that contains the local repo, and don't specify --remote.
From the directory that is your git repository run:
git archive | bzip2 > full/relative/or/qualified/path/to/place/you/want/to/store/your/archive.tar.bz2