How to use libegit2 with Magit - magit

I use Magit with following conditions.
OS: 64bit Windows 10 version 20H2.
Emacs: master branch of git repository, built with MSYS2, installed in C:\Emacs
Magit: master branch of git repository, built with MSYS2, BUILD_MAGIT_LIBGIT=false
Ghub: master branch of git repository, built with MSYS2
Transient: master branch of git repository, built with MSYS2
With-Editor: master branch of git repository, built with MSYS2
dash.el: master branch of git repository
treepy.el: master branch of git repository
As is explained currently I build Magit with BUILD_MAGIT_LIBGIT=false. So git is used as backend. But I took it into my head to use libegit2 with Magit and cloned its git repository.
There was no problem with building libegit2. By simply execute make at the top of source tree, libegit2.dll, libgit.elc and libgit-autoloads.el were created. So I installed libgit.el, libgit.elc and libgit-autoloads.el to C:\Emacs\share\emacs\site-lisp and libegit2.dll to C:\Emacs\bin. Next I rebuilt and reinstalled Magit with BUILD_MAGIT_LIBGIT=true. After that I restarted Emacs and started Magit with M-x magit. Then Magit successfully started but it still used git as backend.
So would someone please explain how to use libegit2 with Magit?

Related

Failing pulling existing Repo in Visual Studio

I downloaded a branch as zip file from git succesfully. After this I cloned repo from in the section below. But still I cant see all the branches that I wanna see. What's the problem here?
ss
try using,
git clone {repo-URL}
In this way the cloned directory will be a git repository with all the git history and branches...

Git Ubuntu to Windows Changes

I am running a Virtual Box Ubuntu VM where I set up my git repository. I then used Samba to create a shared folder and based on another answer (Git not working with Ubuntu → Windows Samba shared directory) I updated my git windows version to 2.16.1 (matches my Ubuntu git version)
I call git status on my Ubuntu VM and find that I'm on branch "master" and I am up to date
I switch to my local machine and on my MINGW64 terminal call git status and after a long delay, a long list of uncommitted changes show up largely "typechange" but some files that are marked as "modified" or "deleted
I switch back to my VM and call git status and after a long delay, I'm told that I'm still on master and am up to date. Calling git status another time the delay goes away
What's going on here and how do I fix it? I already tried git config core.autocrlf true and git config core.filemode false, closed out and re-opened by git terminal and the same issue didn't go away.

Unable to authenticate when creating upstream branch using git-svn

I am unable to use git-svn to create a branch on an svn server, using the git svn branch <branchname> command on windows using either git-bash, cygwin or git extensions.
I would like some guidance/suggestions on how to diagnose and debug this issue.
The output on git-bash and cygwin:
$ git svn branch upstream-branch-name
Copying https://***redacted*** at r132578 to https://***redacted***/branches/upstream-branch-name...
Can't create session: Unable to connect to a repository at URL 'https://***redacted***': No more credentials or we tried too many times.
Authentication failed at C:\Program Files\Git\mingw64/libexec/git-core\git-svn line 1199.
For information, I have cygwin, and TortoiseSVN installed as svn providers on my system.
EDIT1: Additionally, I am able to do git svn rebase and git svn dcommit without any error
Check first your Git version in your Cygwin environment.
I mentioned here a Git 2.13+ (March 2017) should be more robust when it comes to authentication issue.
For testing, try (as mentioned here) to uninstall TortoiseSVN and see if the git svn branch does work then.

ReadMe file won't allow me to commit and push xcode changes to github

I have an existing xcode project and repo on Github. I recently added a ReadMe file which was suggested by Github but now I can no longer commit and push changes to Github. I keep getting an out of date message. How do I fix this problem?
I had the same experience of adding README.md with the same error.
If you don't want to git pull, because the remote version in Github is outdated.
You can also force push all local branches using:
$ git push -f origin master
The following commands in the Terminal will push your local Xcode project to remote Github.
cd <drag location folder of project>
git init
git push -f origin master
You need to git pull.
If you're using the command line, navigate to the directory of the repository and run git pull. If you're using another interface, the steps may be a bit different.

Xcode Source Control Git

When you create a new xcode project, there is a checkbox, which you can check if you want to use a git repository on your mac. I did not check that box, so right now I don't have access to source control resources. How can I start using git with my project?
I think you would just need to setup a local git repository.
Open terminal on your Mac and type the following commands:
cd <DirectoryYourCodeIsIn>
git init
git add .
git commit -m 'initial commit'
Also, restart XCode after this is completed.

Resources