'git pull' on Windows7 frozen process 'git-am.exe' - windows

when I need a pull for remote repo, the command 'git pull' dosen't work.
Only create a processe 'git-am.exe' but nothing happens
On Win7 whit git:
$ git version
git version 2.8.0.windows.1

Could you check if you have any remote set in your git? by git remote -v if not, do set remote in order to get pull request.

Related

git commands working on windows command line but not in Git Bash terminal

I'm working on remote repository with git commands on windows cmd and it works well, but when working with git commands in git bash terminal I get error:
Your configuration specifies to merge with the ref 'refs/heads/feature/branch-name'
from the remote, but no such ref was fetched.
How can I fix it for git bash terminal?
Check first, in your git bash session, the ouput of:
git branch -avv
git status
Make sure the name of the branch you are in matches the remote one, especially considering the case (uper/lowercase), in case it is insensitive in a CMD session, and sensitive in a bash session.
See this example.
If the list of branches show the local one is not linked to a remote tracking one, then, as I documented in "[Difference between git checkout --track origin/branch and git checkout -b branch origin/branch][2]":
git branch -u origin/branch branch
It started working when I moved to the main branch (next).
But, when i switch back to my branch this is what I get:
$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> feature/branch-name
Finally found the answer here:
Why do I have to "git push --set-upstream origin <branch>"?
git push -u origin <your-local-branch-name>
So if your local branch name is coffee
git push -u origin coffee

Git clone on windows : git#github.com is not a git command

I'm trying to clone a repository the ssh way from github and another form gitlab
I'm on windows EDIT : with Git v 2.29.2.2
I'm getting the following error, which I do not understand from what it is coming from :
$ git clone git#github.com:math-gallou/AI21_TPs.git
Cloning into 'AI21_TPs'...
git: 'git#github.com' is not a git command. See 'git --help'.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
So I also tried :
$ git clone "ssh://git#github.com:math-gallou/AI21_TPs.git"
and
$ git clone ssh://git#github.com:math-gallou/AI21_TPs.git
But the same exact error comes out.
When I do the ssh -v git#github.com I can connect with success.
So what did I miss ?
First, if you are trying the ssh:// syntax, then the URL would be:
git clone ssh://git#github.com/math-gallou/AI21_TPs.git
^^^ /, not :
Second, check if you have a %USERPROFILE%\.ssh\config file with a github.com Host entry in it, whose content might be incorrect or mis-interpreted.
In my case, I defined system environment variable GIT_SSH to use openssh I installed, and then git is broken and I got git: 'git#github.com' is not a git command. See 'git --help'..
After deleting system environment variable GIT_SSH everything works again.
Then I tried to define user environment variable GIT_SSH and restart system (I didn't restart system in previous try), somehow now my git works correctly with openssh I installed. I don't know which part is wrong in my previous try but I decide not to waste more time on this.

Xcode upgrade gives "warning: push.default is unset" when doing a git push

I have been using git for some time and it was working fine on my repository. However, I upgraded to XCode 7 recently and now when I try to do a git push <branch>, I get the following error message:
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
fatal: 'Develop_New_Car' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have git version 2.3.3
and running which git gave me /usr/local/bin/git
A git config --global push.default simple should be enough, but XCode7 might not be looking for the global setting in the same place ($HOME) as before.
In that case, try at least to set that config locally in the repo managed by XCode7:
cd /path/to/my/git/repo
git config push.default simple

`git add` doesn't add files to track on Windows

I have a local folder which I wanted to convert to a Git repository and then push to a remote repository. I ran the command git init in the project folder and then used the command git add .. When I run the command git status, I get the message that I have untracked files. I ran the git add . command multiple times but I see the same message.
What should I do to track these files so I can push to a remote repo?
I'm using Windows 8.1 x64 machine.
UPDATE: Please see the answer below.
I used the command git config --system core.longpaths true to fix the error for longer file names. I was able to add all files after making that change.

Gitolite on Windows - cloning stuck

I have installed gitolite on windows server using cygwin, installation steps went without problems and when I try to "ssh gitadmin#gitserver info" from local machine(windows) I get the correct response:
hello gitoliteAdmin, this is gitadmin#VRGWLSDEV1T running gitolite3 v3.6.1-6-gdc
8b590 on git 1.9.4.msysgit.0
R W gitolite-admin
R W testing
If I try to clone using Git Bash I get error:
$ git clone gitadmin#gitserver:gitolite-admin
Cloning into 'gitolite-admin'...
git: 'shell' is not a git command. See 'git --help'.
Did you mean this?
help
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
If I try to clone using cygwin terminal on local mashine (using the same ssh key and I get the same valid gitolite message) it returns:
$ git clone gitadmin#gitserver:gitolite-admin.git
Cloning into 'gitolite-admin'...
...and stays like that for enternity!
I have searched for multiple solutions, added PATH (with Git etc.) to .bashrc and .bash_profile files on gitolite designated server. Also added PATH to .gitolite.rc to include custom Git installation path (before that I did not recieve the gitolite message)
If you have any solution or idea what did I do wrong: please....HELP.
Resolved it by myself:
Mysis Git installation was confusing Cygwin. Added Git pack to Cygwin and removed Msys Git env. variables: everything woks perfectly now.

Resources