Git conflict - mergetool not configured - ruby-on-rails

I have had an issue with my project: I forgot to pull the remote branch before working. then I got a conflict with a stylesheet called application.css
Though when I pulled the remote branch to origin, all not conflicted files were updated (which was good). Only the above file was marked as conflicting.
My command line tool said I had to fix the conflict before commiting.
I then ran : git mergetool
But got an error mergetool not configured and then something called vdiff was launched.
It is a Windows command line conflict resolving tool but I am a bit lost of what I should do. I have no knowledge of the keys that I may use
Can you help me fix this ?

why don't you just open up it up with something like sublime text and then edit the conflicted application.css file manually?
After the conflict is solved you'll have to mark the file as resolved by executing
git add <filename>
Finally, after solving all conflicts, a merge conflict situation needs to be concluded by a regular commit.

Related

Configuring Packer with Neovim

I'm trying to switch over my current setup for Neovim (using Vim Plug) to Packer and I'm having trouble.
My Neovim is loaded from ~/.config/nvim/init.lua which sources all of my plugin and other settings. They live mostly inside of a ~/lua folder (the "main Imports") section of my configuration, including my actual plug-plugins.lua file that references all of my plugins.
-- Main Imports
require("settings")
require("colors")
require("mappings")
require("functions")
require("autocommands")
require("plug-plugins")
...
Later in the same init.lua file, I'm sourcing plugin specific settings for all of these plugins. In order to get my directory working currently, I'm installing everything with :PlugInstall and it works fine.
...
-- Plugin-specific settings
require("plugin-settings/fzf")
require("plugin-settings/fugitive")
require("plugin-settings/ultisnips")
require("plugin-settings/coc")
require("plugin-settings/treesitter")
require("plugin-settings/miscellaneous")
require("plugin-settings/toggle-terminal")
Installing Packer
The installation steps for Packer are pretty sparse, and merely state that you should clone the repository to somewhere in your "packpath" but I'm not really clear what that means. When I'm inside Neovim, and I press :set packpath? I get the following paths:
packpath=~/.config/nvim,/etc/xdg/nvim,~/.local/share/nvim/site,/usr/local/share/nvim/site,/usr/share/nvim/site,/usr/local/Cellar/neovim/HEAD-b74916c_1/share/nvim/runtime,/usr/local/Cel
lar/neovim/HEAD-b74916c_1/lib/nvim,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,~/.local/share/nvim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after
This makes me think that I'm able to just clone the respository to ~/.config/nvim which is the first path listed. I'm not really sure what to do next though, or if this is even right.
Can anyone help? What are the basic steps to getting Packer installed (I'm on MacOS 11.6).
i did recently moved from vim-plug to packer, as per docs when you do git clone of the repo the path provided in readme for installation is ~/.local/share/nvim/site/pack/packer.After successful clone you can start using packer in your plugins.lua as below.
return require('packer').startup(function()
use 'wbthomason/packer.nvim'
end)
you can check the installation by running :PackerSync this will fetch (git clone) the plugin in to the packerpath which is ~/.local/share/nvim/site/pack/packer
Hope this is what you looking for?
I had the exact same situation and it turned out to just be a naming conflict. I had named my local nvim config file lua/packer.lua and changing that fixed the issue.

Gerrit version 2.14.4 online reindexing stuck

How do i know that online reindexing is done ?
I had a repository with name datadelivery-feed-tcp-c++ which I moved to datadelivery-feed-tcp-cpp and deleted the datadelivery-feed-tcp-c++ repository.
But On kicking online reindexing it gives a lot of below warning.It is stuck at this warning.
[2017-09-28 07:00:27,300] [Index-Batch-3] WARN com.google.gerrit.server.index.change.StalenessChecker : error checking staleness of 8737 in datadelivery-feed-tcp-c%252B%252B
org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: Invalid name: datadelivery-feed-tcp-c%252B%252B
I have tried flushing cache also
ssh -p 29418 host gerrit flush-caches --all
How do I resolve it ?
EDIT : By renaming a repo I meant, I have cloned it and imported all the data into other project, verified it and then removed it using delete project plugin
I think you already had changes in the datadelivery-feed-tcp-c++ repository and you just renamed it at the filesystem, correct? You can't do that because you need to adjust the database data accordingly. The better way to rename a repository is doing the following:
1) Clone the original repository (with all existing changes) creating a new one with the new name. Use the importer plugin to do that.
2) Remove the original repository (and all related changes). Use the delete-project plugin to do that.
Notes:
i) In your current case, first rename the repository back to the original name at the filesystem.
ii) You can download the plugins here.

Git isn't pushing everything on my initial commit for my ASP.NET MVC projects. It's always missing references?

I use SourceTree.. i don't have anything in the .gitignore files.. I never had this problem with other types of projects before.. For some reason with my ASP.NET MVC project.. i'll make an initial commit and i'll pull right away in a diff location just to make sure and it's always erroring because it's missing references.. i dont think it's pushing ALL the files and it's missing some.
I've tried it the command line way using these commands here:
git add --all
and also tried
git add --all :/
nothing works. everytime i pull to see if it included everything, i always get a lot of references errors as it seems like it's just not pushing everything.. i'm so frustrated.
thanks for any help.
okay so a coworker was able to find the solution for me.
git config --get core.excludesfile
found that i had a weird global hidden file somewhere random in a hidden folder
git config --globalcore.excludesfile false
that disabled it

Ruby on Rails, Git and CRLF - nontrivial

I am learning Ruby on Rails and I use Windows 7. When I try to commit my changes to Git, I receive the fatal: LF would be replaced by CRLF message.
It seems that rails generate generates files with LF, not CRLF. Of course, I may switch from
git config --global core.autocrlf true
git config --global core.safecrlf true
to
git config --global core.autocrlf true
git config --global core.safecrlf warn
but I don't like the possibility of crushing any committed binary into pieces.
I tried to avoid the problem with .gitattributes, but my lines like
* text=auto
*.rb text
do not help.
Is there a way to make Rails generate files with CRLF ending? Or is there a way to make Git auto-transform the .rb and .erb files, but not others?
I don't like the possibility of crushing any committed binary into
pieces.
Are you sure that's a real problem?
If you turn the warnings off (core.autocrlf true) git will make the adjustments when you commit and you can continue being productive.
If you truly have a solid reason for not wanting to do this you are going to have difficulty as I don't think there is a simple way (there is always some way) to have Rails generate files with the CRLF ending and it's weird to have git auto-transform based on file type.
I can certainly be wrong, but it seems like you're trying a bit too much to work against your tools?
Possibly useful reference: git commit creates assets and temporary files for some reason
If you really want to go down the road of attempting to configure git to make these changes you can check out a git attribute filter driver as suggested in this response: Can git automatically switch between spaces and tabs?
Another useful reference to the above proposed solution: https://stackoverflow.com/a/2354278/1026898

.xccheckout' remains in conflict

On committing code. It gives me following error.
MyProject.xcodeproj/MyProject.xcworkspace/xcshareddata/MyProject.xccheckout' remains in conflict
Can anybody help me solving it ?? Please.
In terminal go to the specific path and reach your MyProject.xccheckout file (MyProject.xcodeproj/MyProject.xcworkspace/xcshareddata/MyProject.xccheckout)
svn resolved MyProject.xccheckout
you will get a svn message "conflict resolved on this file"
Now svn has resolved the conflict on that file and will allow you to commit the project ahead.
try to use following command
svn resolved /file path

Resources