On Windows 8 & trying to use SourceTree as my Git client -- all works but the following:
When I hit the terminal button in Sourctree it says "It has not been possible to start the Git Bash terminal" (yes, I'm using the default SourceTree setting to launch the git bash terminal when this button is clicked).
I am able to bring up said terminal but then I have to cd into the proper directory. Really would like the terminal button to work in SourcTree.
Yeah, for me the solution was to upgrade GIT to newest version. I had 1.9.4 and now I have 2.6.3. It works great. Also I noticed that git has new console right now, I see more colors here :)
Check your git version. If you still have system Git 1.9.5 running, then better upgrade to 2.6.3 now. Check your Git Path too then restart SourceTree. The new git bash terminal looks like this:
This may be useful if Cygwin is installed.
Thanks for suggesting to upgrade Git, but it didn't resolve the issue for me on Windows 7.
To find out Git's location, open a new Git Bash and invoke the which git command:
$ "which git"
/usr/bin/git
Remove git.exe from C:\cygwin\bin.
Restarted SourceTree and it worked.
Related
I am using Windows to do some Linux development with WSL.
When I add Linux repositories to GitHub, it recognizes them, but it gets confused with file names and line endings between Linux and Windows.
This doesn't happen on the terminal tools inside git > Ubuntu > WSL, but it does happen on git > Windows.
Is there a way to either run GitHub Desktop's GUI on Ubuntu within WSL or to make the Windows version run its internal git commands through WSL's bash? Maybe a git configuration in Windows to make it Linux-aware?
I use this repo https://github.com/andy-5/wslgit
With this, you can use the linux git from windows.
To make it work with Github Desktop you have to replace the git it uses, it is in the folder C:\ProgramData\User\GitHubDesktop\app-2.9.12\resources\app\git\cmd
Be careful because it changes every time Github Desktop is updated and you have to change it again.
The git used by Github Desktop is different from the linux one and sometimes some errors come out, I have had to install the git-lfs and git-core packages.
Git bash is closing automatically in a fraction of second after installation how to fix this?
check whether you've installed git properly, open your command prompt or git bash then type
git --version
C:\Users\07>git --version
git version 2.16.1.windows.1
if you're able to get git version something like this then git is installed in your system. If you're getting any errors or not able to open the command prompt or git bash just check whether you've added git path to your system if not add path and check it once again. Refer this for the installation process and check with the release notes as well.
I would like to use WSL (Bash on Windows) Git with VSCode instead of Git for Windows to avoid multiple Git installations.
I created a simple bat script to emulate git.exe comportment by redirecting git commands in WSL. It works nicely in CMD but not with VSCode. Also, WSL is my default terminal in VSCode.
VSCode settings.json:
{
"git.path": "D:\\tools\\git.bat",
"terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\bash.exe"
}
and git.bat:
#echo off
bash -c 'git %*'
Any idea to make VSCode working with WSL Git ?
Since VS Code 1.34 (April 2019) a remote extension has been introduced to develop into WSL: https://code.visualstudio.com/docs/remote/wsl.
Basically, a server instance of VS Code is started into WSL, allowing you to use all the WSL tools (e.g. git) from your client instance on Windows.
Thank you for pointing that out #Noornashriq Masnon!
I created a small tool to solve this for myself, and hosted it on GitHub.
Basic git functionality seems to work, like viewing changes and committing.
A ready-to-use binary can be downloaded from the Releases page.
One of the problems is that the input paths need to be translated from the Windows representation (C:\Foo\Bar) to the Linux paths in WSL (/mnt/c/Foo/Bar), and back again for paths in the output of git.
For example, the Git plugin in VSCode uses the command
git rev-parse --show-toplevel
to find the root directory of the git repository, but with WSL git this of course returns a Linux path that needs to be translated for VSCode on Windows.
Provide the full path for the bash exec :
git.bat :
#echo off
c:\windows\sysnative\bash.exe -c "git %*"
What you can do is to first try wslpath and if that fails you try a normal git command. It's not ideal but it works.
See: Use WSL git inside VS Code from Windows 10 17046
Started getting following error in Sourcetree suddenly. I dont know what is the reason behind it. but I am nit able to resolve it.
Not able to perform any operation.
I ran into this as well. I followed the steps here and it solved my problem:
https://jira.atlassian.com/browse/SRCTREE-2018
Specifically:
Using the terminal and changing your directory to your repository you can do the following (making sure you back up your repository first, just in case):
rm .git/index
git add .
Or if you have changes in your working directory you want to keep you can do the following:
rm .git/index
git reset HEAD .
I had the same issue and it was not fixed even if I deleted the .git/index and .git/index.lock file.
I had to go to SourceTree Options -> Git and select "Use Embedded Git" to make it work. Before it was "Use System Git".
This is happening because Git was installed and then SourceTree with Git inside.
This generated a conflict between the two installed GITs.
You need to uninstall Git or in the SourceTree installation point where it is installed.
I'm facing with the same issue. My software configuration is:
Windows 10
SourceTree 2.0.18.1 configured to use System Git version
Git v2.12.2.windows.1
I updated Git to v2.12.2.windows.2 (the latest build) and the problem
disappeared.
Try doing this
close Sourcetree window
open Sourcetree Bookmarks view
delete bookmark
add bookmark again
I've added remote origin like:
git remote add origin https://github.com/username/repo.git
When I push the git repository, I get this error:
git push -u origin master
fatal: Unable to find remote helper for 'https'
I am on git 1.7.1 on Ubuntu 10.04.4 LTS
Any ideas, greatly appreciated
If you compiled git from source, be sure to install this package first:
apt-get install libcurl4-openssl-dev
I just got the problem yesterday and solved it today, so am posting in case this might help a Windows user. For me, the problem occurred after I updated to the latest version of Git (because Visual Studio was recommending I do so-- something about things not matching.)
It turns out that I installed in the default directory Program Files, but my old Git was in Program Files (x86). (Hadn't noticed until tried reinstalling.)
Uninstalling the new version and installing the 64-bit Git for Windows Setup listed under Other Git for Windows downloads (which is not the default) overlaying the version in Program Files (x86) worked. (I tried other combinations of version and folders first.)
I did have to delete the local repository already created and restart with git init, git add ., git commit -m "first commit", git remote add origin theGitUrl (all of which worked before), before doing the git push origin master. The weird thing is that a pop-up window appeared to enter my user name and password. I didn't notice it at first and thought the processing on the git push was hung up. So, heads up about that "Other Git for Windows" version.
I did change my Environmental Variables before the fix; I don't know if that helped. I added these 2 to the PATH:
C:\Program Files (x86)\Git\bin
C:\Program Files (x86)\Git\libexec\git-core
I did this for both User and System variables.
A note on updating the PATH in Windows 10: you have to add one at a time and not include the ;
After much searching, the answer is you need git version 1.7.7
Can't update RVM - "fatal: Unable to find remote helper for 'http'"
I was working in a chroot jail and thought i had copied everything i needed for git to work but i was missing the git-core files themselves so i just had to copy them:
cp -r /usr/lib/git-core /opt/chroot/myjail/usr/lib/
Add this to git config: (Checked in centos 6.7 and working)
#git config --global url.https://.insteadOf git://
#To see the config added
#git config --list
url.https://.insteadof=git://
user.name=username
user.email=youremail
....