The following untracked working tree files would be overwritten by merge, but I don't care
2023-02-16
Question On my branch I had some files in .gitignore On a different branch those files are not. I want to merge the different branch into mine, and I don't care if those files are no longer ignored or not. Unfortunately I get this: The following untracked working tree files would be overwritten by merge How would I modify my pull command to overwrite those files, without me having to find, move or delete those files myself?…
.gitignore for Visual Studio Projects and Solutions
2023-02-15
Question Which files should I include in .gitignore when using Git in conjunction with Visual Studio Solutions (.sln) and Projects? Answer See the official GitHub's "Collection of useful .gitignore templates". The .gitignore for Visual Studio can be found here: https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
How to amend several commits in Git to change author
2023-02-15
Question I have made a series of commits in Git and I realise now that I forgot to set my user name and user email properties correctly (new machine). I have not yet pushed these commits to my repository, so how can I correct these commits before I do so (only the 3 latest commits on the master branch)? I have been looking at git reset and git commit -C <id> --reset-author, but I don't think I'm on the right track.…
.bashrc at ssh login
2023-02-14
Question When I ssh into my ubuntu-box running Hardy 8.04, the environment variables in my .bashrc are not set. If I do a source .bashrc, the variables are properly set, and all is well. How come .bashrc isn't run at login? Answer .bashrc is not sourced when you log in using SSH. You need to source it in your .bash_profile like this: if [ -f ~/.bashrc ]; then . ~/.bashrc fi
`require': no such file to load -- mkmf (LoadError)
2023-02-14
Question I was trying to install rails on Ubuntu Natty Narwhal 11.04, using ruby1.9.1. I installed ruby using apt-get install ruby1.9.1-full which contains the dev package. I googled the error and all have suggested I install the 1.9.1-dev which I already have. Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb extconf.rb:36:in `require’: no such file to load – mkmf (LoadError) from extconf.…
Adding a new entry to the PATH variable in ZSH
2023-02-14
Question I'm using zsh terminal, and I'm trying to add a new entry (/home/david/pear/bin) to the PATH variable. I don't see a reference to the PATH variable in my ~/.zshrc file, but doing echo $PATH returns: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games So I know that the path variable is being set somewhere. Where is the PATH variable set / modified for the zsh terminal? Answer Actually, using ZSH allows you to use special mapping of environment variables.…
After installing with pip, "jupyter: command not found"
2023-02-14
Question After installing with pip install jupyter, terminal still cannot find jupyter notebook. Ubuntu simply says command not found. Similar with ipython. Did pip not get install properly or something? How does Ubuntu know where to look for executables installed with pip? Answer Try python -m notebook Or, if you used pip3 to install the notebook: python3 -m notebook On Mac OS Catalina and brewed Python3.7